Doubt regarding the use of Aggregates in Area Code

Asked

Viewed 11 times

0

I am hurting the principles of DDD and concept of Aggregates if using one agraregate within another as the scenario below?

Context of a small e-commerce.

Aggregate - Store

public class Store
{
  public Guid Id { get; private set; }
  public string ShopName { get; private set; }
  public int Phone { get; private set; }
  public string ShopUrl { get; private set; }
  public IList<Vendor> Vendors { get; private set; }
  
  ///Aqui é um aggregate, pois uma loja tem uma coleção de produtos
  public IList<Product> Products { get; private set; }
}

Aggregate - Product

public class Product
{
    ///To do
}
No answers

Browser other questions tagged

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