Git Product home page Git Product logo

domain-driven-design-example's Introduction

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 protected]

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

api/customer/[email protected]

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

api/customer/update?id=5D5020DA-47DF-4C82-A722-C8DEAF06AE23&[email protected]

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

domain-driven-design-example's People

Contributors

zkavtaskin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.