public async Task <JsonResult> AddBet(string bet) { BetDto betDto = JsonConvert.DeserializeObject <BetDto>(bet); try { var currentBet = await _auctionService.AddBet(betDto); await _hubContext.Clients.All.SendAsync("Notify", $"Добавлена новая ставка: {betDto.CurrentBet} - {DateTime.Now.ToShortTimeString()}"); return(Json(new { success = true, result = currentBet })); } catch (Exception ex) { return(Json(new { success = false, result = ex.Message })); } }