public IActionResult Count() { try { return(Ok(_service.Count())); } catch (Exception e) { _logger.LogError(-1, e, String.Format(LogErrorText, e.Message)); return(BadRequest(String.Format(BadRequestText, "calculating types"))); } }