Download source code 7.86 MB
What does Repository mean?
Dictionary meaning: A place where things may be put for safekeeping.
The Repository Pattern allows to centralise all data access logic in one place. It is a common construct to avoid duplication of data access logic throughout our application. The Repository pattern adds a separation layer between the data and business layers of an application.
Generic Repository Pattern:
A generic(relating to) repository is often used with the ORM(entity framework) to speed up the process of creating a data layer.With generic feature, we can reduce the amount of code we need for common scenarios.
interface IRepository<T> : IDisposable where T : class
T GetById(object Id);
void Insert(T model);
void Update(T model);
void Delete(object id);
Continue reading “MVC5 CRUD Using Generic Repository Pattern”