I am working on asp.net mvc-5 web application, and i am separating my code into View & Model & Controller classes, i also add a repository class, so i do not directly initiate my context object inside the action methods, instead i initiate the context object from repository and reference the repository from the action methods.
But seems i can add an extra layer to my MVC application by either adding helper classes to my Controller classes, or adding a new service classes.
-
i found this link which talks about helper classes :- Where can I put custom classes in ASP.NET MVC?
-
and this link which talks about service classes :- http://ift.tt/1OIjeQa
so not sure when to use Repository Vs Service Classes Vs Helper Classes.. i can find many articles and documentations about these approaches ,, but can not find specific mvc-related documentations which list when to use each approach inside asp.net mvc??
Aucun commentaire:
Enregistrer un commentaire