1.5.2 released
- 提供
[AutoDto]
对record
记录的支持 - 优化分析器代码
public class User
{
public string Id { get; set; } = null!;
public string FirstName { get; set; } = null!;
public string LastName { get; set; } = null!;
public string? FullName => $"{FirstName} {LastName}";
}
[AutoDto(typeof(User), nameof(User.Email))]
public partial record User4Dto
{
public string? Wooo { get; set; }
}
[AutoDto<User>(nameof(User.Id))]
public partial record class User5Dto(int Id)
{
/// <summary>
/// 如果DTO存在主构造函数,必须有无参构造函数,否则Mapper ToDto方法会报错
/// </summary>
public User5Dto() : this(1) { }
public string? Wooo { get; set; }
}
Full Changelog: 1.5.1...1.5.2