Beispiel #1
0
        public async Task <IActionResult> GetEmailAccountCount()
        {
            var Response = new SingleResponse <int>();

            try
            {
                Response.Model = await _IEmailAccountRepository.CountNumberOfEmailAccountsAsync();

                Response.Message = $"Querying the total number of EmailAccounts.";
                _Logger.LogInfo(ControllerContext, Response.Message);
            }
            catch (Exception ex)
            {
                Response.DidError = true;
                Response.Message  = "Internal Server Error.";
                _Logger.LogError(ControllerContext, $"Error Message: {ex.Message}");
            }
            return(Response.ToHttpResponse());
        }