In this chapter, you will learn how to specify the details of our database structure by using the Entity Framework API. We will build on what you have learned in Chapter 2, Your First Entity Framework Application, and write entity classes that define types of columns in destination tables. We will discover how to specify a relationship between tables in your database, through properties in entity classes and the configuration API. We will look at various ways to configure table structures. We will also see how .NET types map to SQL Server column types.
In this chapter, we will cover how to:
Create classes that define a table structure using the simple and primitive types
Handle nullable and required properties
Define attributes and configuration classes, as well as use the model builder API to specify column types
Specify One-to-One, One-to-Many, and Many-to-Many relationships between classes