From the course: Practical Application Architecture with Entity Framework Core

Unlock the full course today

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

Repository

Repository

- [Instructor] The repository pattern is a way to isolate data retrieval and persistence into a single unit. It can be almost the entire data layer, but it certainly isn't a required part of a data layer. This is just one pattern that we can use as part of the data layer with Entity Framework. Here's the definition of the repository pattern, "The repository mediates between the data source layer "and the business layers of the application. "It queries the data source for the data, maps the data "from the data source to business entity "and persists changes in the business entity "to the data source. "A repository separates the business logic "from the interactions with the underlying data source "or web service." The first thing to notice here is the similarity between the description of the data layer in the last video and this definition. The primary difference is this definition specifies the combination of query retrieval and mapping to business objects. Entity Framework uses the…

Contents