edandersen / core-admin

Fully automatic admin site CRUD UI generator for ASP.NET Core and .NET 8
Other
599 stars 111 forks source link

Possible to add support for MetadataTypeAttribute? #78

Closed ErikEJ closed 1 year ago

ErikEJ commented 2 years ago
    [MetadataType(typeof(SalesPersonMetadata))]
    [Table("SalesPerson")]
    public partial class SalesPerson
    {
        [Key]
        public int Id { get; set; }
        [StringLength(100)]
        public string Name { get; set; } = null!;
        [Column(TypeName = "datetime")]
        public DateTime CreatedDate { get; set; }
        public bool Deactivated { get; set; }
    }

    public class SalesPersonMetadata
    {
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
    }