public ProductCategory(Id id, Title title, ProductCategoryShortDescription shortDescription, Image image) { Id = id; Title = title; ShortDescription = shortDescription; Image = image; Validator .Begin(id, nameof(id)) .NotDefault() .Map(title, nameof(title)) .NotDefault() .ThrowApiException(nameof(ProductCategory), nameof(ProductCategory)); }
public ProductCategory(Title title, ProductCategoryShortDescription shortDescription, Image image) : this(new Id(Guid.NewGuid()), title, shortDescription, image) { }