diff --git a/ConfectionaryFileImplement/OrderStorage.cs b/ConfectionaryFileImplement/OrderStorage.cs index aae2076..c2dc788 100644 --- a/ConfectionaryFileImplement/OrderStorage.cs +++ b/ConfectionaryFileImplement/OrderStorage.cs @@ -63,14 +63,14 @@ namespace ConfectioneryFileImplement public OrderViewModel? Update(OrderBindingModel model) { - var pastry = _source.Orders.FirstOrDefault(x => x.Id == model.Id); - if (pastry == null) + var order = _source.Orders.FirstOrDefault(x => x.Id == model.Id); + if (order == null) { return null; } - pastry.Update(model); + order.Update(model); _source.SaveOrders(); - return pastry.GetViewModel; + return order.GetViewModel; } } } diff --git a/ConfectionaryFileImplement/Pastry.cs b/ConfectionaryFileImplement/Pastry.cs index f32067c..6138c0c 100644 --- a/ConfectionaryFileImplement/Pastry.cs +++ b/ConfectionaryFileImplement/Pastry.cs @@ -1,7 +1,6 @@ using ConfectioneryContracts.BindingModels; using ConfectioneryContracts.ViewModels; using ConfectioneryDataModels.Models; -using ConfectioneryDataModels.Models; using System.Xml.Linq; namespace ConfectioneryFileImplement.Models