asp.net entity framework tutorial part- 9

Опубликовано: 02 Октябрь 2024
на канале: tutorialaspnet
2,085
1

http://www.jquell.com/ In this tutorial you will create separate classes for business logic and for data-access logic. The class that encapsulates data-access logic is called a repository. The business logic class includes both business-logic methods and data-access methods, but the data-access methods call the repository to perform data-access tasks.you will also create an abstraction layer between your BLL and DAL that facilitates automated unit testing of the BLL. This abstraction layer is implemented by creating an interface and using the interface when you instantiate the repository in the business-logic class. This makes it possible for you to provide the business-logic class with a reference to any object that implements the repository interface. For normal operation, you provide a repository object that works with the Entity Framework. For testing, you provide a repository object that works with data stored in a way that you can easily manipulate, such as class variables defined as collections.