In the code first approach of entity framework we have two methods to configure the entities: DataAnnotations and Fluent API.