System.ComponentModel.DataAnnotations
Fluent Relationships
Example 1, Data Annotations
1. Primary Key
2. Relationship & ForeignKey
3. Column Name
Example 2, Fluent API, same as above example
1. Primary Key
2. Relationship & ForeignKey
3. Column Name
Example 3, Fluent API but group it, same as above example
DbModelBuilder.Configuration.Add()
EntityTypeConfiguration<EntityName>
Fluent API Configurations
沒有留言:
張貼留言