Whats a recommended solution structure for a somewhat large website in asp.net

后端 未结 2 1681
别跟我提以往
别跟我提以往 2021-02-06 10:20

Im currently trying to refactor a project(asp.net mvc) that doesnt have any separation at all. just folders :s

  • The project has a bunch of EF Code First classes (Pe
2条回答
  •  星月不相逢
    2021-02-06 11:11

    We use a similar design to that mentioned by jdmonty but a bit simpler. We do the following:

    • ApplicationName.Web - MVC Application
    • ApplicationName.Services - Business logic
    • ApplicationName.Domain - EF CodeFirst classes and the repositories that act on them
    • ApplicationName.Common - Classes and utilities used by multiple projects
    • ApplicationName.Tests - Test for the various projects

    The Web project is dependent upon the Services project. The Services project is dependent upon the Domain project.

提交回复
热议问题