From the course: Learning ASP.NET

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Entity Framework design approaches

Entity Framework design approaches

From the course: Learning ASP.NET

Start my 1-month free trial

Entity Framework design approaches

- [Instructor] We'll focus on Entity Framework as our ORM tool for data access. At its core is the Entity Data Model which stores details about how application classes map to database tables and columns. There's three main ways to create the model, and we'll explore each approach. The Code First approach enables developers to write code to create the object model first. The development team can build classes that suit their application, and then generate the database from that design. Attributes can be added to properties to control the database configuration. For example, by specifying the name of the table or column and its maximum length. At run time, Entity Framework generates the models and mappings based on the classes and configurations added by the developer. You can also use Code First with an existing database. In this scenario, Entity Framework Tools helps you generate code to map to the database. This process reverse engineers the object model from the database. With the…

Contents