diff --git a/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs b/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs index cb95d28..36b3f18 100644 --- a/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs +++ b/FurnitureAssembly/FurnitureAssemblyBusinessLogic/OrderLogic.cs @@ -41,7 +41,7 @@ namespace FurnitureAssemblyBusinessLogic if (!ChangeStatus(model, OrderStatus.Принят)) { _logger.LogWarning("Order's status is wrong"); - return false; + throw new InvalidOperationException("Order's status is wrong"); } if (_orderStorage.Insert(model) == null) @@ -64,7 +64,7 @@ namespace FurnitureAssemblyBusinessLogic if (!ChangeStatus(model, OrderStatus.Выполняется)) { _logger.LogWarning("Order's status is wrong"); - return false; + throw new InvalidOperationException("Order's status is wrong"); } _orderStorage.Update(model); return true; @@ -81,7 +81,7 @@ namespace FurnitureAssemblyBusinessLogic if (!ChangeStatus(model, OrderStatus.Готов)) { _logger.LogWarning("Order's status is wrong"); - return false; + throw new InvalidOperationException("Order's status is wrong"); } model.DateImplement = DateTime.Now; _orderStorage.Update(model);