Created
December 2, 2018 17:14
-
-
Save laugri/e6b994739bbc6c2074540ff3af7f0782 to your computer and use it in GitHub Desktop.
DDD Example - Aggregate.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Our ShoppingCart example of an Entity is actually also an aggregate. | |
class ShoppingCart { | |
id: ShoppingCartId; | |
items: Array<ShoppingCartItem> | |
addItem(item: ShoppingCartItem) { | |
// implementation | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment