Пример #1
0
 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));
 }
Пример #2
0
 public ProductCategory(Title title, ProductCategoryShortDescription shortDescription, Image image) : this(new Id(Guid.NewGuid()), title, shortDescription, image)
 {
 }