public async Task <IActionResult> CalculateResult(int id, string indexId) { try { float result = await repository.Calculate(id, indexId); return(Ok(result)); } catch (RestException ex) { return(ex.SendStatusCode()); } }