Loic.zkavtaskin.Domain-Driven-Design-Example 1.0.0

dotnet add package Loic.zkavtaskin.Domain-Driven-Design-Example --version 1.0.0
                    
NuGet\Install-Package Loic.zkavtaskin.Domain-Driven-Design-Example -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Loic.zkavtaskin.Domain-Driven-Design-Example" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Loic.zkavtaskin.Domain-Driven-Design-Example" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Loic.zkavtaskin.Domain-Driven-Design-Example" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Loic.zkavtaskin.Domain-Driven-Design-Example --version 1.0.0
                    
#r "nuget: Loic.zkavtaskin.Domain-Driven-Design-Example, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Loic.zkavtaskin.Domain-Driven-Design-Example@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Loic.zkavtaskin.Domain-Driven-Design-Example&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Loic.zkavtaskin.Domain-Driven-Design-Example&version=1.0.0
                    
Install as a Cake Tool

Domain-Driven-Design-Example C#

Alt text

Repository objective: To supplement blog articles on DDD (see below) and create easy to follow Domain-driven design repository that makes sense (if it still makes no sense then please do let me know).

Please do note that this is my interpretation of Domain-driven design (i.e. biased). Please use this for theoretical / educational purposes only.

Articles

Applied Domain-Driven Design (DDD), Part 1 - Basics

Applied Domain-Driven Design (DDD), Part 2 - Domain events

Applied Domain-Driven Design (DDD), Part 3 - Specification Pattern

Applied Domain-Driven Design (DDD), Part 4 - Infrastructure

Applied Domain-Driven Design (DDD), Part 5 - Domain Service

Applied Domain-Driven Design (DDD), Part 6 - Application Services

Applied Domain-Driven Design (DDD), Part 7 - Read Model Services

Applied Domain-Driven Design (DDD), My Top 5 Best Practices

Applied Domain-Driven Design (DDD), Event Logging & Sourcing For Auditing

alt tag

Structure

  • eCommerce.WebService
  • eCommerce
    • ApplicationLayer
      • Domain Area
        • Dto
        • Interface
        • Implementation
    • DomainModelLayer
      • Domain Area
        • Entity
        • Enum
        • Spec
        • Value
        • Event
    • InfrastructureLayer

API

To keep things simple I have created in memory repository with few saved items. To start using simply download, open solution and run.

Customer

Customer already exists (John Smith, ID: 5D5020DA-47DF-4C82-A722-C8DEAF06AE23).

But if you would like to add my customers here are urls that you can call:

api/customer/add?FirstName=john2&LastName=smith2&Email=john2.smith2@microsoft.com

api/customer/Getbyid/5D5020DA-47DF-4C82-A722-C8DEAF06AE23

api/customer/IsEmailAvailable?email=smith.john@microsoft.com

api/customer/RemoveById/5D5020DA-47DF-4C82-A722-C8DEAF06AE23

api/customer/update?id=5D5020DA-47DF-4C82-A722-C8DEAF06AE23&Email=smith.john@microsoft.com
Product

Product already exists (iPhone, ID: 65D03D7E-E41A-49BC-8680-DC942BABD10A).

But if you would like to add more products here are urls that you can call:

api/product/add?name=iPhone5&quantity=6&cost=422&productcodeid=B2773EBF-CD0C-4F31-83E2-691973E32531

api/product/get/65D03D7E-E41A-49BC-8680-DC942BABD10A
Cart

Customer and product already exists, so feel free just to call these urls:

/api/cart/add?customerid=5D5020DA-47DF-4C82-A722-C8DEAF06AE23&productid=65D03D7E-E41A-49BC-8680-DC942BABD10A&quantity=1

/api/cart/getbyid?customerid=5D5020DA-47DF-4C82-A722-C8DEAF06AE23

/api/cart/remove?customerid=5D5020DA-47DF-4C82-A722-C8DEAF06AE23&productid=65d03d7e-e41a-49bc-8680-dc942babd10a&Quantity=1

/api/cart/checkout?customerid=5D5020DA-47DF-4C82-A722-C8DEAF06AE23
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 7/31/2021