Mixing Fluent API and DataAnnotations in EF code first

You can use Data Annotation attributes and Fluent API at the same time. Entity Framework gives precedence to Fluent API over Data Annotations attributes.

Leave a Comment