https://github.com/jokk-itu/simple-shop
Project creating the simple shop from the database-modelling website.
https://github.com/jokk-itu/simple-shop
csharp domaindrivendesign dotnet entityframeworkcore
Last synced: 26 days ago
JSON representation
Project creating the simple shop from the database-modelling website.
- Host: GitHub
- URL: https://github.com/jokk-itu/simple-shop
- Owner: jokk-itu
- License: apache-2.0
- Created: 2023-07-06T15:00:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T07:18:54.000Z (over 2 years ago)
- Last Synced: 2025-08-10T06:02:52.682Z (10 months ago)
- Topics: csharp, domaindrivendesign, dotnet, entityframeworkcore
- Language: C#
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-shop
Project creating the simple shop from the database-modelling [website](https://database-modelling.com/exercise/simple-shop-system).
The model has been implemented using a DDD approach with EF Core as ORM framework.
The project is implemented as a Minimal API, to support simple CRUD operations.
## DDD
Entity, Aggregate Root and ValueObject.
Repository pattern (Generic or Per AggregateRoot).
UnitOfWork (Transactions).
Readonly lists in entities.
Private setters in entities.
DomainEvents (Executed in transaction or executed asynchronously)
## Datamodel
```mermaid
---
title: Simple Shop System
---
erDiagram
ORDER {
INT Id PK
NVARCHAR(32) Name "NOT NULL"
NVARCHAR(32) Organization "NULL"
NVARCHAR(128) Address "NOT NULL"
NVARCHAR(32) City "NOT NULL"
NVARCHAR(32) State "NULL"
INT ZipCode "NOT NULL"
INT Phone "NOT NULL"
INT PaymentMethod "NOT NULL"
NVARCHAR(32) Email "NULL"
INT DeliveryMethod "NOT NULL"
DATETIME DeliveryAt "NOT NULL"
TEXT Instructions "NULL"
}
ORDERITEM {
INT Quantity "NOT NULL"
ORDER Order "NOT NULL"
ITEM Item "NOT NULL"
}
ITEM {
INT Id PK
NVARCHAR(32) Name "NOT NULL"
DECIMAL Price "NOT NULL"
}
ITEM ||--o{ ORDERITEM : ""
ORDER ||--|{ ORDERITEM : ""
```