Sometimes I pull active objects with LINQ expression.
Using filtering with LINQ can be considered business rule and in a scenario like Domain-Driven Design (DDD))?
What is the best place to use (in Domain services or in Infra repositories).
Sometimes I pull active objects with LINQ expression.
Using filtering with LINQ can be considered business rule and in a scenario like Domain-Driven Design (DDD))?
What is the best place to use (in Domain services or in Infra repositories).
Generally so, no. LINQ is not business rule. What you will do with LINQ will determine whether it is business rule or not.
In DDD they will say that the best place is in domain services. In other contexts most will say that it will be in the repository (in the model ), but some people also say that it is not the right place. Anyway first you need to make sure that this is really a business rule. It is common for people to rate other activities as a business rule.
Some questions on the subject already speak of this, there is one where I I present the best ones and question each one .