public async Task <IActionResult> CreateCalculation([FromBody] Calculation calculation) { try { calculation.Agent = Agent + "/ ip = " + calculation.Agent; calculation.CreatedAt = DateTime.UtcNow; calculation = await calculationService.Calculate(calculation); await calculationService.CreateCalculationAsync(calculation); return(new OkObjectResult(calculation)); } catch (Exception ex) { return(new BadRequestObjectResult(new { Message = ex.Message })); } }