Creating a Service Layer for my MVC application?

后端 未结 5 731
盖世英雄少女心
盖世英雄少女心 2020-12-04 05:05

From what I understand, MVC separates the class definitions (model) from the presentation (view) via the \"glue\" that is the controller. The controller should have a singl

5条回答
  •  -上瘾入骨i
    2020-12-04 05:36

    Sounds like you'd be after something like a repository pattern. You can read about it here:

    http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application

    This answer here may also help:

    Best Repository Pattern for ASP.NET MVC

提交回复
热议问题