public async Task <BalanceOutput> GetBalanceGurobi(BalanceInput input) { return(await Task.Run(() => { try { // Решение задачи Solver solver = new Solver(input); solver.BalanceGurobi(); return solver.balanceOutput; } catch (Exception e) { return new BalanceOutput { Status = e.Message, }; } })); }