ПИбд-23 Салин Олег Алексеевич Лабораторная работа №6 (Усложненная) #23

Closed
Oleja123 wants to merge 13 commits from Lab6_Hard into Lab5_Hard
Showing only changes of commit 99119e1652 - Show all commits

View File

@ -18,6 +18,7 @@ namespace IceCreamShopBusinessLogic.BusinessLogic
{
private readonly ILogger _logger;
private readonly IOrderStorage _orderStorage;
static readonly object locker = new object();
public OrderLogic(ILogger<OrderLogic> logger, IOrderStorage orderStorage)
{
@ -92,7 +93,10 @@ namespace IceCreamShopBusinessLogic.BusinessLogic
public bool TakeOrderInWork(OrderBindingModel model)
{
return ChangeStatus(model, OrderStatus.Выполняется);
lock (locker)
{
return ChangeStatus(model, OrderStatus.Выполняется);
}
}
public bool FinishOrder(OrderBindingModel model)