Skip to content

1.5.2 released

Compare
Choose a tag to compare
@vipwan vipwan released this 08 Nov 08:27
· 5 commits to master since this release
  • 提供[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; }
}

#4

Full Changelog: 1.5.1...1.5.2