Implementing SOLID Web API using ASP.NET Core

The following article shows how to implementing SOLID Web API using ASP.NET Core. The projects use Generic repository pattern to perform CRUD operations, and XUnit as test runner.

Our solution will contain three key namespace:

  • Data access: it will implement information about the domain model and the relationship between entities. It will also contain the information about data context;
  • Domain Logic: it will implement the repositories and services used by our web APIs;
  • API: it will implement controllers and middlewares to manage incoming requests;

Project overview

Here is a brief schema of the project structure:

Project Testing

The key parts of the project are convered by unit tests or integration tests.

Show your support

Clapping shows how much you appreciated Samuele Resca’s story.