Improving Entity Framework by using a code-first approach
In this recipe, we start by separating the application into a user interface (UI) layer, a data access layer, and a business logic layer. This will allow us to keep our objects separated from database-specific implementations. The objects and the implementation of the database context will use a layered approach so we can add testing to the application. The following table shows the various projects, and their purpose, available for code-first approach:
Project |
Purpose |
---|---|
|
Stores the entities that represent business entities. |
|
Classes that access data and manipulate business entities. Depends on the |
|
User interface – the MVC application. ... |
Get Entity Framework Core Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.