O'Reilly logo

Code-First Development with Entity Framework by Sergey Barskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Defining the Database Structure

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required