This template extends Microsoft POCO Entity Generator to support adding DataAnotations on the generated fields. The template is usefull for MVC3 projects and adds data anotations based on fields information retrieved from database. Currently I have added support for [Required] [MaxLenght] attributes only. The template just retrives Nullable property on your database field and adds [Required] attribute on the generated POCO property, if the database field is of type string and has some max lenght provided, then it will add [MaxLength(n)] attribute on the generated POCO field, where 'n' is maxlenght specified in database. |