Вторая лабораторная работа. Фикс названия переменной в IngredientStorage
This commit is contained in:
parent
1875896d5e
commit
01e6d6c168
@ -62,14 +62,14 @@ namespace ConfectioneryFileImplement.Implements
|
|||||||
}
|
}
|
||||||
public IngredientViewModel? Update(IngredientBindingModel model)
|
public IngredientViewModel? Update(IngredientBindingModel model)
|
||||||
{
|
{
|
||||||
var component = source.Ingredients.FirstOrDefault(x => x.Id == model.Id);
|
var ingredient = source.Ingredients.FirstOrDefault(x => x.Id == model.Id);
|
||||||
if (component == null)
|
if (ingredient == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
component.Update(model);
|
ingredient.Update(model);
|
||||||
source.SaveIngredients();
|
source.SaveIngredients();
|
||||||
return component.GetViewModel;
|
return ingredient.GetViewModel;
|
||||||
}
|
}
|
||||||
public IngredientViewModel? Delete(IngredientBindingModel model)
|
public IngredientViewModel? Delete(IngredientBindingModel model)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user