Closed shijialee closed 4 years ago
Hello,
_waitlistMembers is a List, therefore there is no query to the database:
private List<MeetingWaitlistMember> _waitlistMembers;
As @rmaziarka wrote, there is no query to the database.
Aggregate pattern, in DDD terms, is immediate consistency boundary so during Aggregate loading you load every aggregated object (like _waitlistMembers list) to memory and save the whole Aggregate in one transaction.
Additional note: There is a pattern called Lazy Loading when objects are loaded as late as possible but this is often considered as an anti-pattern. I don't recommend this approach too and it is not used in this project, but I know DDD practitioners who use it.
Thanks.
So that .Where().OrderBy()...
usage is the from LINQ? That's the first reference when searching FirstOrDefault
.
Yes, this is LINQ to Objects https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/linq-to-objects
Hi,
Coming from a dynamic language developer background, I am little puzzled by this piece of code:
from https://github.com/kgrzybek/modular-monolith-with-ddd/blob/c680815b5c9d8af2d0a42ca768ba2d15312a0558/src/Modules/Meetings/Domain/Meetings/Meeting.cs#L177
That looks like a db query in entity to me. Am I mistaken? I read that calling repository from Aggregate/Entity is not recommended in DDD.
Can someone shed some light?
thanks
James