Data access layer

All the repositories and database persistence classes reside under the data access layer (DAL). This layer is used by the business layer to perform database operations. For database persistence, we will use Entity Framework Core - Code first model. Entity Framework is an object relational-mapper (ORM), which enables developers to work with relational data using domain specific object and allows the use of LINQ or Lambda expressions to search or filter data.

Let's start by creating a new Console Application (.NET Core) project. The reason why we create the .NET Core console application is because we will run the .NET CLI commands to run database migrations and it will not work with the class library project as per the present configurations:

In our DAL, we will implement a Repository, Unit of work pattern, and Factory patterns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.77.4