0

I know that the way you set up your solution and working environment is subjective at best, but I'm looking for some guidance and possible examples for structuring a solution that uses ASP.NET Core, WebAPI and a repository pattern. I've looked online and within stackoverflow and I have seen lots of examples for various configurations but none that come close to what I'm intending to do.

I'm about to start plotting out an enterprise level application and I want to make ensure I set off on the right foot with it and it would be nice to see possible solutions structures that could help with that.

Any links or advice is appreciated.

2
  • The solution layout isn't that big a deal as long as you keep your different concerns clearly separated. Eg, Web concerns in one area, Business concerns in another, Persistence concerns in yet another. Once you've got that separation of concerns worked out shuffling the solution layout (if needed) shouldn't be too difficult.
    – MetaFight
    Commented Apr 5, 2018 at 12:08
  • I tend to separate my concerns into distinct Assemblies/projects. A Web project for incoming HTTP requests, an Application Service project which exposes my application logic in a technology-agnostic way (used by the Web project), one or more Domain projects to implement my Domain logic, a persistence project that implements my repositories, and occasionally a Common project for interfaces.
    – MetaFight
    Commented Apr 5, 2018 at 12:11

1 Answer 1

3

"Solution Architecture" Tends not to mean: "The structure of my visual studio solution and the projects it contains"

It's more generally, "What technologies am I combining together to make the infrastructure of the application"

So in your case you have already chosen part of the solution architecture.

  • .Net Core WebApi sites.

You might add:

  • Hosted in Azure
  • Storage on MSSQL databases

The "Technical Architecture" for the component might be "n tier, using repository pattern behind a service and hosting layer" in which case you would lay out your VS Solution something like.

myCompany.MyService
    myCompany.MyService.Hosting     - .net core webapi
    myCompany.MyService.Models      - .net standard class lib with models
    myCompany.MyService             - .net standard class lib with business logic
    myCompany.MyService.Repository  - data access layer
    myCompany.MyService.Database    - database project
    myCompany.MyService.Client      - .net standard client lib
2
  • Could you please explain more about data base project? Commented Jul 18, 2018 at 13:45
  • a visual studio database project
    – Ewan
    Commented Jul 18, 2018 at 14:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.