465 questions
0
votes
1
answer
80
views
A repository interface located in the Domain layer does not have access to DTOs, which belong to the Application layer
I searched Stack Overflow and didn't find an answer to a similar question.
In a query handler, which is in the Application layer, I want to retrieve only a subset of the properties from the Customer ...
0
votes
0
answers
44
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 ...
3
votes
2
answers
456
views
How to implement a Repository in DDD correctly
I have a question regarding DDD and the repository pattern.
I have an AggregateRoot Report that has Transactions (which is an Entity Array).
I used to have a CRUD repository and when I was modifying a ...
1
vote
2
answers
214
views
EF Core related entity not saved
I have an EF Core setup where in a class, I have a navigation property. As far as I can tell I followed the examples from Microsoft to the dot, yet my added entity is not persisted.
I set up ...
1
vote
2
answers
144
views
Best Practices for Managing Unbounded Collections within Domain-Driven Design Aggregates
I'm designing an e-wallet system using Domain-Driven Design (DDD), and I'm facing a challenge regarding the design of my aggregates. Specifically, I have an aggregate representing an e-wallet, which ...
0
votes
1
answer
19
views
Need more parameters in subclass overridden method
I use ddd in my learning project. The repository uses domain classes and internally maps them to persistence classes. In the base repository, I have the method Add(domainClass) and in the subclass ...
1
vote
1
answer
162
views
DDD With Entity Framework in .NET -- Update on Products for an Ecommerce like logic
I am currently trying to implement DDD on an ecommerce application. This is on an already existing application that used ntier architecture. I am taking it one step at a time trying to generate domain ...
1
vote
1
answer
592
views
DDD, creating domain object that depends on Ids from the persistence layer
I'm delving into Domain-Driven Design (DDD) and encountered a scenario that seems like a typical challenge. It revolves around creating domain objects, such as Aggregates, that depend on IDs which are ...
2
votes
0
answers
213
views
Why is my TYPO3 Symfony command able to add new objects to repositories but not update existing ones depending on the project instance?
the question does indeed seem a bit odd, but let me explain.
Also I'm not sure about some of the tags of this question.
We have a TYPO3 10 project in which we are using EXT:news as means to manage and ...
1
vote
1
answer
36
views
Facing issue when debug the code. It seems like everything is fine but don`t how to fix this
public IBaseRepository<TEntity, TIdentifier> GetRepository<TEntity, TIdentifier>(Expression<Func<TEntity, TIdentifier>> identifierExpression) where TEntity : class
{
var ...
3
votes
2
answers
2k
views
How to map database entity to the domain entity in DDD
I faced the issue of mapping the database entity to the domain entity in DDD.
Here are the details (simplified).
Domain layer with domain aggregate (entity) and the interface for the repository of ...
0
votes
1
answer
74
views
Validate based on data in another aggregate root
The short version:
Canteen
openDays
Customer
id
bookingDays
change(newBookingDays){
if (newBookingDays not in >>>canteen.openDays<<<)
...
2
votes
2
answers
458
views
How to define many-many using fluent api with EF Core
I have one entity named Team and another entity League. Now let's say that i want to create a many-many relationship between them but with an additional column/property that i need to define from code ...
0
votes
3
answers
667
views
what is the best practice to recover domain object from storage in DDD
In the process of DDD practice, i found that there was a mismatch between domain objects and persistent objects. I understand that DDD recommends that domain objects only expose the key fields and ...
1
vote
2
answers
1k
views
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'...
0
votes
0
answers
124
views
Add Services to Asp.Net Controller Scope
Short: How/is it possible to add services to the scope of all (Odata)Controllers of a assembly without adding them to every controller in the application (i.e. give the assembly a permanent scope with ...
1
vote
2
answers
721
views
DDD: should I have data in entities or should I get the data from the repository
Let's say that I have a Seller aggregate with 2 collections: product for sale and sold-out products. I also have a Product aggregate with status (for sale or sold-out). Should I have the two ...
-2
votes
1
answer
82
views
Several Domain Drive Design questions
Lately I am trying to learn DDD and I am working on a test project. I have a few questions conserning my code. I just want to clarify that the meantions of Event in this code snippet refer to concerts,...
0
votes
1
answer
1k
views
Entity Framework Core get entity column name
I'm having a little trouble returning a table column name dynamically.
I created an ASP net core 3.1 project in DDD standard and I am using Entity Framework Core v5.0.12.
And I created the entity as ...
5
votes
1
answer
6k
views
I'm confused how to update Entity in Domain Driven Design
I'm learning DDD and have some troubles.
I've created rich domain model with value objects and some functions for manipulating model properties.
Currently i'm using in memory DB and my domain models ...
1
vote
1
answer
481
views
In which layer should I put a custom repository parameter
I am developing an application according to DDD. So I have my repositories' interfaces in the Domain layer.
My requirement is to make a searchByParams method. My question is : is it correct that this ...
1
vote
1
answer
728
views
ABP IRepository<Entity,int> is null when called from Console application
I am trying to call a Domain service from integration test cases, so I create teamManager object using GetRequiredService() : _teamManager = GetRequiredService();
by this I am able to access methods ...
2
votes
1
answer
615
views
DDD Repository vs Factory, Am I rehydrating or creating?
We have an externally-owned SQL server with data that needs to be in our periodically ported into our team-owned (SQL) server.
The external and internal server share the same domain concepts but exist ...
3
votes
3
answers
1k
views
Why repositories work with domain entities?
In DDD, I've seen the following code many times where an entity is passed as parameter to the save method of a repository.
class MysqlUserRepository
{
public function save(User $user) {}
}
As far ...
1
vote
1
answer
729
views
Where does Anti-corruption Layer layer fit in layered architecture? Integrating third-party services
I'm trying to learn domain-driven design, and in my app I'm implementing authentication. I'm using Firebase Authentication to perform authentication. All authentication related stuff is in a separate ...