Why do we use Repositories?

 Posted by Kmandapalli on 2/4/2014 | Category: ASP.NET MVC Interview questions | Views: 3272 | Points: 40

Repositories are minly used in MVC. It does not mean creating the database by itself or storing the data anywhere. It is just an approach in MVC. As we have n-tier architecture in asp.net, similarly repositories are a kind of architecture in MVC where we can create a repository class and write all the business logic in this class. We can just call this method from controller and there is no need to write any kind of business logic which makes our controller simple.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response