public async Task <IActionResult> CountSystemTemplates() { try { _logger.LogInformation("Calling CountSystemTemplates()"); long result = await _TemplateRepo.CountSystemTemplates(); _logger.LogInformation("Called CountSystemTemplates()"); return(Ok(result)); } catch (Exception ex) { _logger.LogError(ex, "Error Retrieving System Template Count in MongoDB"); return(NotFound()); } }