Questions tagged [aggregateroot]

A cluster of associated objects that are treated as a unit for the purpose of data changes. External references are restricted to one member of the Aggregate, designated as the root. A set of consistency rules applies within the Aggregate's boundaries.

441 questions
0
votes
0 answers

Viewmodel from two aggregate root

I have two aggregate root : Event : Id - name - title - categoryId Category : Id - CategoryName These model are separate aggregate roots in my project.and i have a viewmodel from these models(asp.net mvc) : EventViewModel: Id - name -…
0
votes
1 answer

DDD Conceptual Model to Domain Model with Aggregate Roots

I'm trying to model my domain based on an existing C# WinForm based system I did to improve my learning on DDD, so I've put together a hypothetical conceptual model to simplify matters. The system itself did not have a typical business domain with…
Andez
  • 5,588
  • 20
  • 75
  • 116
0
votes
1 answer

DDD: Domain Events implementation in monolithic application

I've made some small research about Domain Events, and have found few different solutions Udi Dahan solution, which handle events immediately Deferred domain events, which fire off in infrastructure mostly Domain Events which return result …
0
votes
2 answers

DDD dealing with 2 domains performing same actions

Not quite sure how to approach this problem regarding DDD. Say you have 2 domains: A Product domain which is responsible for creating new and managing existing Products which a person has created. Product Aggregate Root A Store domain which is…
Shane van Wyk
  • 1,870
  • 1
  • 26
  • 62
0
votes
2 answers

Domain Driven Design - Creating general purpose entities vs. Context specific Entities

Situation Suppose you have Orders and Clients as entities in your application. In one aggregate, the Order entity is considered to be the root but you also want to make use of the Client entity for simple things. In another the Client is the root…
0
votes
2 answers

DDD: Question about Aggregate boundaries

I have a complicated scenario in which two aggregate boundaries sort of contradict each other. I have 2 Entities: Request and Mission. User creates Requests and later on he can create Missions and assign existing Requests to a Mission. Requests…
Mosh
  • 5,944
  • 4
  • 39
  • 44
0
votes
1 answer

Remove child records from aggregate root using entity framework

My customer business object is an aggregate root for a collection of addresses. public class Customer { Public Customer {Addresses = new List
} public virtual List
Addresses { get; set; } // other properties } Public class…
Kirsten
  • 15,730
  • 41
  • 179
  • 318
0
votes
2 answers

Modeling an aggregate with a time-bound collection

How would you deal with an aggregate root that has a large set/ collection? Here's a concrete example similar to what I'm currently working on: Say I'm working on an application that helps an academic institute scheduling their courses. An…
0
votes
2 answers

How can I model a template-like entity in DDD?

I am a beginner with DDD and I try to model elegantly in C# the next scenario: A template that basically has only a name property on it and a list of items that have to be executed in a specific order. public class Template { public string…
Gradinariu Cezar
  • 553
  • 1
  • 5
  • 12
0
votes
2 answers

Domain Logic and Referencing AR by ID

I am trying to model a simple application using DDD. Consider the following simplified code where the idea is to hide a Comment if its parent Post is hidden: class Post { private $hidden; public function isHidden() { return…
Joyce
  • 57
  • 9
0
votes
2 answers

Are aggregate-wide events acceptable?

In an application that uses event sourcing is it acceptable to have aggregate-wide events? Consider a contrived example of a blog application that provides the ability to create posts and add and remove simple tags (post would be the aggregate…
Benjamin Gale
  • 12,977
  • 6
  • 62
  • 100
0
votes
1 answer

Where to implement data access for an aggregate root entity accessor method

I have an aggregate root named Account and an entity named Contact that can be accessed through a method on the root: Account.GetContactById(string id). Access to the aggregate root is through a repository, so data access logic to get Accounts from…
BitMask777
  • 2,543
  • 26
  • 36
0
votes
1 answer

How to Persist N Value Objects in an Aggregate Root

In DDD, in an aggregate root of Person with a Value Object of Address, mapping that address to a database table is simple: just embed the attributes of the Address object into the record. But what about when the Person has a List, where the count…
BCA
  • 7,776
  • 3
  • 38
  • 53
0
votes
1 answer

DDD: Storing reference to non-Aggregate Root Entity from different Bounded Context

I'm struggling to understand how to model my problem: A Company can have many Teams. Each Team must have a unique name per Company. Reports for a particular Team must be retrievable, along with a list of all reports for a Company. Just now, I have…
0
votes
1 answer

Aggregate Root calling other aggregate root domain service.

I have an Aggregate Root (AR1) that references another Aggregate Root (AR2) by Identity. i.e. as discussed here http://www.informit.com/articles/article.aspx?p=2020371&seqNum=4 Now in one of my methods in AR1 I need to access the full object of AR2…