ASP.NET MVC & ADO.NET Entity Framework clientside validation
- by JK
Using aspnet mvc2 with the model auto-generated by entity framework:
Is it possible to tell entity framework to auto-annotate all fields? eg:
If database field says not null then add [Required]
If DB field is a nvarchar(x) then add [StringLength(x)]
And so on?
What if the field name contains the string "email" eg CustomerEmail - can I get EF…