6,888
questions
0
votes
1
answer
31
views
How to save changes in .NET 8 EF Core DDD AggregateRoot design pattern
I am working on a HR management project and trying to save entity changes with EF Core and .NET 8.
Controller:
[Route("api/[controller]")]
[ApiController]
[Authorize]
public class ...
0
votes
1
answer
14
views
Error creating bean with name "webSecurityConfiguration" with spring data mongodb
I am using the "Spring Data MongoDB" persistence to develop an API with a backend connected to mongodb, the problem I have is when I want to create the repositories, because they ask me for ...
-4
votes
0
answers
24
views
What are your thoughts on replicating a part of another domain when using DDD and Microservices in this scenario? [closed]
Currently, I am trying to apply DDD and Microservices, and I have been facing the following situation:
Imagine there are 3 domains: User, Customer, and Service Order.
There are 2 types of users: Admin ...
0
votes
1
answer
48
views
Implementing DDD relation/child/aggregate with a HTTP API as persistence
We are doing a REST web API in C#. We have some form of clean/onion architecture with application, domain and infrastructure layers. I would like to inject some DDD ideas into the project so that the ...
0
votes
1
answer
55
views
Advantage of using Either<Maybe<int>, InformationEntries> over nullable and exceptions [closed]
I don’t see any significant advantage in using Either/Maybe/InformationEntries over simple nullable types with exceptions, especially in .NET 8 / C# 12, where the compiler handles nullable types very ...
0
votes
1
answer
35
views
How to map rest resource, domain model and entity
I have a shop object where one area can only contain only one open shop.
Entity model
@Entity
Public class Shop{
@Id @GeneratedValue Long id;
String Name;
String Area;
String closed;
}
Domain ...
0
votes
0
answers
27
views
DDD: Modelling different type of aggregates with some common behaviour and state (Not of transitioning nature)
I am trying to implement an HR management module wherein I have three 3 types of employees namely RegularEmployee, ReengagedEmployee, OutsourcedEmployee. All of them have some common properties like ...
0
votes
1
answer
38
views
Struggle with names in DDD ; how to name my services and entities in external layers?
I'm trying to create a clean API project structure relaying on the DDD principles.
So far I have :
Project.Api : REST Endpoints, controllers, and Program.cs for the DI configuration.
Project.Domain : ...
0
votes
1
answer
34
views
DDD, How to update a ValueObject?
The question refers to a situation in which I have to update a valueobject.
For example, I have a Product valueobject with a List<String> tags property in it. For some reason, I have to update ...
0
votes
0
answers
16
views
How to represent multiple chains of events in Event Storming?
When I try to model a system with event storming, every now and then I arrive at a situation where user can run one of the several commands. How do I represent that in a timeline?
For example, let's ...
2
votes
3
answers
305
views
Recommended approach to get data from one BoundedContext/AggregateRoot with some additional data from a different BoundedContext/AggregateRoot?
I am thinking of building a modular monolith, using Spring Modulith, and also apply Domain Driven Design (DDD).
I have a question regarding fetching data from multiple modules and what is the ...
1
vote
2
answers
73
views
If View Model property has value with certain length, replace it with query from database.Do it in Controller, Validation Attribute or somewhere else?
My View Model looks like this:
public class ProductVM
{
public string SerialNumber { get; set; }
// Other properties left out for brevity
}
In the form that fills this model, users can ...
0
votes
4
answers
38
views
Separation of concerns in business layer (usecases, services)
Let's say at the beginning I had a requirement where by sending a post request to my /posts API endpoint - post had to be created.
To implement this I created a PostsUsecases thinking about it as a ...
0
votes
1
answer
30
views
Where should database calls that return primitive types be located and who should be calling them, Application Services or Domain Services?
As far as I know Repositories should work with Domain/Business Entities. All the operations to save and retrieve data to create entities should go there, and then the Repository is used by the Domain ...
0
votes
2
answers
41
views
Can ValueObject be independent?
I have in my database table "Spam" with words which are not allowed in user comments. If the user uses any word from the Spam table, their comment is automatically rejected. In this case, is ...