Skip to content
/ AspNetCore-DDD Public template
forked from ntxinh/AspNetCore-DDD

Full ASP.NET Core 5.0 LTS application with DDD, CQRS and Event Sourcing

License

Notifications You must be signed in to change notification settings

gtechsltn/AspNetCore-DDD

 
 

Repository files navigation

Diagram

Overview

Architecture

Dependencies

Project dependencies

Code flow

Repository & Unit Of Work

Techical Stack

  • ASP.NET Core 5.0 (with .NET Core 5.0)
  • ASP.NET WebApi Core
  • ASP.NET Identity Core
  • Entity Framework Core
  • .NET Core Native DI
  • AutoMapper
  • FluentValidator
  • MediatR
  • Swagger UI
  • MSSQL
  • xUnit
  • Moq
  • Fluent Assertions
  • Polly
  • Refit

Design Patterns

  • Domain Driven Design
  • Domain Events
  • Domain Notification
  • CQRS
  • Event Sourcing
  • Unit Of Work
  • Repository & Generic Repository
  • Inversion of Control / Dependency injection
  • ORM
  • Mediator
  • Specification Pattern
  • Options Pattern

How to run

  • Visual Studio: Just run
  • VSCode: Just run
  • Terminal: dotnet run --project src/DDD.Services.Api/DDD.Services.Api.csproj --launch-profile Dev

Testing

  • Terminal: dotnet test

Docker

docker build -t aspnetcore-docker-image .
docker run -it --rm -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-image
docker run -d -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-image

Swagger (Dev env only)

Health check (Staging & Prod env only)

TODO

  • Use multiple environments
  • Transaction (Unit of Work)
  • Validation (FluentValidation)
  • Response wrapper
  • Async/Await
  • REST
  • JWT
  • Mapping (AutoMapper)
  • API Specification, API Definition (Swagger)
  • ORM {Entity Framework Core}
  • Middleware
  • CORS
  • Pagination
  • Sorting
  • Error Handling, Global Exception
  • HealthCheck
  • Mail
  • Http
  • Database Auditing: CreatedAt/UpdatedAt CreatedBy/UpdatedBy
  • Soft Delete
  • Common: Constants, Helpers
  • Docker
  • EF: Shadow Properties
  • Events
  • Unit Testing
  • Integration Testing
  • Scoped over Transient
  • Use abstract keyword to appropriate class
  • Use IQueryable, IEnumerable, IList interfaces
  • Use NetStandard 2.1 for Class Library
  • Hashing
  • AnalysisLevel: Automatically find latent bugs
  • Migration, Scaffold
  • Data Seeding
  • Logging
  • OAuth2, OIDC (OpenId Connect)
  • SignalR
  • Search
  • Kafka, RabbitMQ
  • Microservices, API Gateway
  • Multi-tenancy
  • StyleCop
  • API Versioning
  • API Versioning with Swagger
  • Primary Key to Integer
  • File storage: Upload/Download
  • Kubernetes
  • Globalization & Localization
  • Caching
  • Kestrel
  • Secret Manager
  • Task scheduling & Queues
  • Session & Cookie
  • Notifications
  • Encryption
  • EF: No-tracking queries
  • Dapper, Dapper Contrib (Optional)
  • BulkInsert, BulkUpdate, Async method for IRepository

References

About

Full ASP.NET Core 5.0 LTS application with DDD, CQRS and Event Sourcing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.1%
  • Dockerfile 0.9%