public SubcategoryObject(Guid id, string name) { Id = new SubcategoryId(id); this.name = name; }
public bool HasSubcategory(SubcategoryId id) => subcategories.Any(x => x.Is(id));
public bool Is(SubcategoryId id) => Id == id;