Updated CatalogItem to support more updates; added tests
This commit is contained in:
@@ -33,7 +33,9 @@ namespace Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints
|
||||
|
||||
var existingItem = await _itemRepository.GetByIdAsync(request.Id);
|
||||
|
||||
existingItem.Update(request.Name, request.Price);
|
||||
existingItem.UpdateDetails(request.Name, request.Description, request.Price);
|
||||
existingItem.UpdateBrand(request.CatalogBrandId);
|
||||
existingItem.UpdateType(request.CatalogTypeId);
|
||||
|
||||
await _itemRepository.UpdateAsync(existingItem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user