The Ultimate Visual Studio Solution Structure

前端 未结 3 1279
傲寒
傲寒 2020-12-07 07:13

Realizing that this could be subjective based on the project at hand, I\'m looking for the \"best practice\" method of structuring a VS (Visual Studio) Solution.

Ple

3条回答
  •  忘掉有多难
    2020-12-07 07:39

    Your solution/project structure looks pretty sound to me. If you've never taken a look at S#arp Architecture, you may want to. The main difference between your structure and S#arp's architecture is that S#arp's breaks out the Controllers, Services, and Repositories into separate projects. The main benefit of doing this is that it becomes easier to enforce boundaries on your dependencies (e.g. you won't accidentally access data access specific libraries from code in Core).

    Other than that, your structure looks very similar to the one I tend to use for my projects. I also add an "Extensions" folder for extension methods, since those are sometimes hard to find a good place for.

提交回复
热议问题