From the course: Learning ASP.NET
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.