My team tries very hard to stick to Domain Driven Design as an architectural strategy. But, most of the time, our domain entities are pretty anemic. We\'d like to be putting mor
The behaviour that is on your entities should reflect the business model. What can be done to or by that entity is the business world should be sopmething that can be done to or by the entity class. For example:
In an online shopping system, you can add a product to your cart. So the Cart class should look like this:
public class Cart
{
//...
public void AddProduct(Product product)
{
...code to add product to cart.
}
}
It could be argued that the methids should reflect the use cases.