Comments (1)
Using DDD principles you shouldn't link Aggregate Roots. The Order and ApplicationUser are aggregate roots.
As a rule of thumb an Aggregate should only reference other aggregates by their Id. That means you shouldn't add navigation properties to other aggregates (this prevents different aggregates manipulating each other and leaking business logic to each other).
You should explicitly query the ApplicationUser by the UserId if you need to get User information
If you have OrderLine class then this would be an entity class and you could therefore attached to the Order class i.e.
public class Order : AuditableEntity, IAggregateRoot
{
....
public Guid UserId{ get; set; }
public Collection<OrderLine> OrderLines {get; set;}
}
Hope that helps :-)
Kevin
from dotnet-webapi-starter-kit.
Related Issues (20)
- Use wolverine for new version?
- Payment Service
- [BUG] Updating a User sets a Cookie
- [BUG] ApiVersioning is not working HOT 3
- [BUG] MediatR - Startups issues
- [Doc] How to use POT / Localization / Translation HOT 2
- [BUG] CORS origin error while on subdomain
- [BUG] Random error "Unable to connect the server"
- [BUG]
- [BUG] [v2] Swagger WithSummary / WithDescription metadata doesnt show up on the UI HOT 5
- [BUG] Can not login after update nuget Microsoft .... 7.0.16 HOT 2
- [BUG] Not able to get token based on the latest source code (up to 17th Mar) HOT 1
- Not able to run migration while using db as oracle
- Not able to run migration while using db as oracle HOT 1
- Search by keyword for virtual property
- [BUG] Docker certificate HOT 1
- Is there any plan to migrate to Finbuckle 7.0.0 ? HOT 3
- Does .NET 8 will be supported? HOT 1
- Config custom JWT Bearer and Microsoft Identity Web Api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-webapi-starter-kit.