Questions tagged [ddd-service]
90 questions
0
votes
1 answer
How to Use Contains a vlaue object type in DDD repository?
I have a project that is designed with pattern Domain Driven Design. But I have a problem in using ‘Contain’ in this design.
I have an entity that has a "name" field that is of type "StudentName". The type is the value object.
public class Student :…

Yaser Nouri
- 9
- 5
0
votes
0 answers
Load data from child entity in AggregateRoot's property
In DDD, I want to get data of child entity of his AggregateRoot in a property of AggregateRoot and work with the data of that child entity,
But I don't know is it a good idea or not? Is it true that I access the child entity repository and get data…

حسین محمدی
- 1
- 1
0
votes
0 answers
How I Test my API call Method .NET 6 Moq X-Unit
I have this Method on my service layer, my project is builded on DDD Architecture i want to know how I Test my method that calls and api without call the original service returning a post
I Mocked the Interface of Service but when i debug, not…

Sergio Esteban
- 1
- 2
0
votes
1 answer
DDD: using aggregates inside another aggregates
DDD: Can aggregates get other aggregates as parameters?
According to this, its OK to use aggregates inside another aggregates. But its requires to change multiple aggregates at one transaction. So is it truth that this rule can be easily skipped and…

yytrofimov
- 15
- 6
0
votes
0 answers
How to use data from one aggregate in another in DDD?
I have question regarding to use data from one aggregate in another in DDD. Imagin you have two bounded context Project which encapsulating all data about projects and plan responsible for managing work plan for users. One of invariatnts say:…
0
votes
0 answers
DDD - transactions with services, repositories and aggregates
I have a root aggregate Orders. Orders have line items. I have a repository of type IOrderRepository, which has methods like GetOrderName, GetAllOrdersItems, AddLineItem, RemoveLineItem, CountOrderItems.
Let's say I am using SQL. I use 2 tables -…

friartuck
- 2,954
- 4
- 33
- 67
0
votes
2 answers
DDD - validation related entities in aggregate root
I'm trying to understand DDD concept and validation of entities inside aggregate root.
Let me explain.
Let's assume we have Web app where user have to register to the app and can join tournament (let's say by scaning qr code). Later on he'll be able…

kenik
- 142
- 3
- 13
0
votes
1 answer
DDD in Android app : communication between aggregate and application service
I'm trying to apply domain driven design in an Android project. There is a common use case that the User wants to change his/her name and this new name should be synced with backend.
class User {
// ...
fun changeName(newName:String,…

rayworks
- 741
- 9
- 15
0
votes
1 answer
DDD - Can an aggregate method with an aggregate parameter block an action based on that aggregate parameter's state?
Imagine two aggregates Product and Order. An Order instance can have multiple Products as order line items and this association is done using an OrderLine class.
Here are the classes:
public class Order {
.
.
Set orderLines;…

Amirhosein Al
- 470
- 6
- 18
0
votes
1 answer
Designing Leaderboard Scores in DDD
There are two entities around this problem, mainly
Leaderboard - Which holds the info about type(lowest first/highest first), description, name etc.
Score - The score value submitted by the player which holds player details along with score…

Ayyappa
- 1,876
- 1
- 21
- 41
0
votes
2 answers
Domain Drive Design, how to implement this type of rule
I try to practice DDD but I have a doubt about this type of rules that I wrote bellow:
class UserAggregator under domain layer.
public class UserAggregator{
private UUID userId;
private String userName;
private String country;
//getter
boolean…

BERGUIGA Mohamed Amine
- 6,094
- 3
- 40
- 38
0
votes
2 answers
Where is the best layer (Presentation, Service, Domain, Repository) to set a image path url
I have a question for you.
I have a .NetCore proyect with a hexagonal architecture. In my repository class I fill my domain class that its name is company and has two properties: Id and Logo.
My repository returns de Id and the logo name, but not…

Mr.Beto
- 115
- 1
- 4
- 12
0
votes
1 answer
DDD considering Repositories & Services for entities
I've been getting acquainted with DDD and trying to understand the way Entities and Aggregate Roots interact.
Below is the example of the situation:
Let's say there is a user and he/she has multiple email addresses (can have up to 200 for the sake…

iam.Carrot
- 4,976
- 2
- 24
- 71
0
votes
2 answers
Which project in a solution to add a Domain Service that spans two aggregates?
I currently have two projects within one Visual Studio solution. Each project represents a different aggregate. I need to add a domain service that interacts with the two aggregate roots. Which project should I add it to? Does it matter?

Mike Lenart
- 767
- 1
- 5
- 19
0
votes
1 answer
Domain Driven Implementation - Updating a single property inside Aggregate Root
I am new to DDD and I would like to have some advice on a few challenges I am facing in the implementation of it.
I am using Typescript to develop the application. The data is persisted in a Relational DB. We are not following CQRS pattern and our…

Praveen Kumar
- 977
- 3
- 12
- 26