упрощение кода логики магазина
This commit is contained in:
parent
8834faa3ae
commit
5eda887cf9
@ -117,13 +117,14 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics
|
||||
{
|
||||
selectedStore.Manufactures[manufacture.Id - 1] = (manufacture, selectedStore.Manufactures[manufacture.Id - 1].Item2 + count);
|
||||
SaveChanges(selectedStore);
|
||||
_logger.LogInformation("Filled store Id = {storeId} with manufacture Id = {manufactureId}. Count = {count}", model.i)
|
||||
_logger.LogInformation("Filled store Id = {storeId} with manufacture Id = {manufactureId}. Count = {count}", model.Id, manufacture.Id, count);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//иначе добавляем изделие в магазин в указанном количестве
|
||||
selectedStore.Manufactures.Add((manufacture, count));
|
||||
SaveChanges(selectedStore);
|
||||
_logger.LogInformation("Added new manufacture Id = {manufactureId} in store Id = {storeId}. Count = {count}", manufacture.Id, model.Id, count);
|
||||
return true;
|
||||
}
|
||||
private void CheckModel(StoreBindingModel model, bool withParams = true)
|
||||
|
Loading…
Reference in New Issue
Block a user