Repository Design Pattern : Implementing Generics, MOQ, MSTEST In ASP.NET MVC

Repository Design Pattern is a way to encapsulate repetitive data access code.

Repository Pattern is effective data access design pattern when we want to:
  • Increase testability of the application. Make test repeatable without touching the data source;
  • Implement Separation of Concerns between the business logic and data source or business logic and test units;
  • Make the application work with different data source such SQL Server, mySQL, Oracle, web api endpoints, xml file and other RDBMS out in the market.
  • Make our code reusable. Effective on CRUD.