Home

Awesome

NLayerAppV3

This N-Layered Architecture with .Net Core 2.1 project (NLayerAppV3) is retro rebuild new code project based on DDD N-LayeredArchitecture Version 2. It contains all DDD Layers where the developer and software architect may reuse to implement a .Net Core WebApi (Version 2.1) for Banking and Blog Contexts. Why to use .NET Core 2.1? We need to use this version because of EF Core Complex Types - Value Object implementation (OwnsOne) and TransactionScope implementation using in Application Layer. This project is a tribute to the recent visit to Madrid of Cesar de la Torre in order to give us an amazing conference called 'Microservices Architectures' [https://geeks.ms/plainnews/2017/05/04/microservices-architectures/].

Demo

Getting Started

Install the .NET Core 2.1 runtime for your host environment from [https://www.microsoft.com/net/core/] (https://www.microsoft.com/net/core/)

In a terminal, navigate to the folder of this project and type the following to restore the dependencies:

dotnet restore

To start the API, navigate to the 'DistributedServices.MainBoundedContext' folder and type:

dotnet run

Browse to http://localhost:5000/ to see the result.

To run the tests, navigate to the 'DistributedServices.MainBoundedContext.Tests' or antoher test project folder and type:

dotnet test

Code Overview

The solution consists of sixteen projects: the API, Application, Domain and infrastructure projects.

DistributedServices.MainBoundedContext

This project contains the API controllers (sync and async methods).

Dependencies

DistributedServices.MainBoundedContext.Tests

This project contains the integration and unit tests.

Dependencies

Application.Seedwork

This project contains Error Exceptions and Projections Extensions.

Dependencies

Application.MainBoundedContext

This project contains the modules and an anemic generic application common service.

Dependencies

Application.MainBoundedContext.DTO

This project contains the DTOs, profiles and validations.

Dependencies

Application.MainBoundedContext.Tests

This project contains the adapters and application services tests.

Dependencies

Domain.Seedwork

This project contains the base entities with guid, int and string identities, value object and auditable classes.

Dependencies

Domain.Seedwork.Tests

This project contains unit tests.

Dependencies

Domain.MainBoundedContext

This project contains the aggregates, domains entities, value objects, factories, specifications and the repositories interfaces.

Dependencies

Domain.MainBoundedContext.Tests

This project contains unit tests of the domain entities, value objects, ....

Dependencies

Infrastructure.Data.Seedwork

This project contains the Repository base class and some interfaces.

Dependencies

Infrastructure.Data.MainBoundedContext

This project contains the repositories.

Dependencies

Infrastructure.Data.MainBoundedContext.Tests

This project contains the repository unit tests.

Dependencies

Infrastructure.Crosscutting

This project contains the Adapters, Localization and Validator Crosscutting definitions.

Dependencies

Infrastructure.Crosscutting.NetFramework

This project contains the Adapters, Localization and Validator Crosscutting factory implementations.

Dependencies

Infrastructure.Crosscutting.Tests

This project contains the crosscutting unit tests.

Dependencies

Documentation

Things to improve

Feedback

Feedback about this project is greatly appreciated.

Copyright

2017 César Castro and Microsoft Corporation