ヘキサゴナルアーキテクチャのサンプルです。
C#で記述されています。
詳しい解説はホームページに記載します。
https://srnlib.com/hexagonal-architecture/
ポートアダプターの形を取っています。
ASP.net MVC(.NET Framework)で構成されています。
プライマリアダプタの実装です。
DDDでいうアプリケーション層です。
プライマリポートにあたります。
ドメイン層です。
ヘキサゴナルアーキテクチャ上のApplicationです。
またRepositoryはセカンダリポートを表しています。
ビジネスロジックを表現しており、そのほかの層の何にも依存しないように実装します。
インフラストラクチャ層です。
セカンダリアダプタの実装です。
集約(Aggregate root)を構築する役目を担います。
DAOやEntityFrameworkを活用したインフラストラクチャ層を構築するときは別プロジェクトにすることが予想されます。
特にどれにも属さない共通クラスライブラリです。
This is a sample of hexagonal architecture.
Using ASP.net MVC (.NET Framework). Primary adapter.
Application layer.
Primary port.
Domain layer.
Application in hexagonal architecture.
Repository is secondary port.
Business logic descrived here.
Infrastructure layer.
secondary adapter.
Implementation for the data store exists.
If you need DAO -- Oracle, Mysql , etc --, You should make new project.
Common library
This is a library not belonging to any one.