Data Annotations Attributes

Hi there,

please have a look:

Why doesn't razen add these properties to the generated domain models when scaffolding an existing db table schema? EF Core is able to do, so why doesn't Radzen use this feature of EF Core using data annotation support?

That would life make much more easier for us when using your Blazor-components in Visual Studio.

e.g.

[Required]
[MaxLength(500)]
public string Annotation { get; set; }

1 Like

Radzen works with meta data inferred directly from the database (database first) not from EF Core classes (code first). All default values, relationships, lengths, etc. are described in the DbContext using Fluent API. There will be no problem to extend your models with partial classes and specify various attributes if you need them, the UI of Radzen however will depend on the database meta and models will be generated according to the meta.