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

后端 未结 2 1683
别跟我提以往
别跟我提以往 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:08

    I would suggest following a Domain Driven Design (DDD) and one suggested way of laying this out would be creating the following projects:

    Company.Project.Web <-- Your MVC Application, though you can still use WebForms Company.Project.Domain <-- Data Transfer Objects (DTO's), ViewModels, Business Logic, Events Company.Project.Data <-- Repository Interfaces

    Company.Project.Data.EF <-- EntityFramework Specific Implementation of Repositories Company.Project.Model <-- Your EF CodeFirst Classes

    Company.Common <-- A common project of utilities and/or extensions

    I would suggest you take a look at Project Silk http://silk.codeplex.com/ from the patterns and practices team. Great reference implementation of DDD, Repository, and MVC as well as mixing in HTML 5 and jQuery (vNext).

提交回复
热议问题