public void Enrich(IHalResponseBuilder halResponseBuilder, ShopCategoryAggregate category) { if (halResponseBuilder == null) { throw new ArgumentNullException(nameof(halResponseBuilder)); } if (category == null) { throw new ArgumentNullException(nameof(category)); } halResponseBuilder.AddEmbedded(e => e.AddObject(_responseBuilder.GetShopCategory(category), (l) => l.AddSelf(@"/" + Constants.RouteNames.ShopCategories + "/" + category.Id))); }
public static Category ToModel(this ShopCategoryAggregate category) { if (category == null) { throw new ArgumentNullException(nameof(category)); } return(new Category { Id = category.Id, Description = category.Description, Name = category.Name, ParentId = category.ParentId, PinImagePartialPath = category.PinImagePartialPath }); }
public AddShopValidationResult(ShopCategoryAggregate category) { IsValid = true; Category = category; }