Can LINQ be considered business rule?

Asked

Viewed 111 times

6

Sometimes I pull active objects with LINQ expression.

Utilise filtering with LINQ can be considered a business rule and in a scenario such as DDD (Domain-Driven Design)?

What is the best place to use (in Domain or in repositories in the Infra).

1 answer

5


Generally speaking, no. LINQ is not a business rule, it is a programming mechanism. What you will do with LINQ will determine whether specific use is business rule or not.

In Ddds they will say that the best place is in the domain services. In other contexts most will say that it will be in the repository (no model), but there are also those who say that it is not the right place. Anyway first you need to make sure that it is really a business rule. It is common for people to classify other activities as a business rule.

Some questions on the subject already speak of this, there is one where I I present the best and ask a question in each one.

  • 1

    Thanks man, always helping the community. Keep it up.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.