последний штрих

This commit is contained in:
leonteva.v 2024-05-25 03:02:19 +04:00
parent 6b6526b2c8
commit b89f9d25fd

View File

@ -14,6 +14,7 @@ namespace LawFirmBusinessLogic.BusinessLogics
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IOrderStorage _orderStorage; private readonly IOrderStorage _orderStorage;
static readonly object _locker = new object();
public OrderLogic(ILogger<OrderLogic> logger, IOrderStorage orderStorage) public OrderLogic(ILogger<OrderLogic> logger, IOrderStorage orderStorage)
{ {
_logger = logger; _logger = logger;
@ -79,7 +80,10 @@ namespace LawFirmBusinessLogic.BusinessLogics
} }
public bool TakeOrderInWork(OrderBindingModel model) public bool TakeOrderInWork(OrderBindingModel model)
{ {
return StatusUpdate(model, OrderStatus.Выполняется); lock (_locker)
{
return StatusUpdate(model, OrderStatus.Выполняется);
}
} }
public List<OrderViewModel>? ReadList(OrderSearchModel? model) public List<OrderViewModel>? ReadList(OrderSearchModel? model)
{ {