public async Task <IActionResult> Get()
        {
            const string message = "HealthCheck Status OK";
            await appService.GetAll();

            return(Ok(message));
        }
        public async Task <IActionResult> Get()
        {
            var result = await appService.GetAll();

            if (!result.Any())
            {
                return(NoContent());
            }

            return(Ok(result));
        }
示例#3
0
        public async Task <IActionResult> Get()
        {
            return(await Task.Run(() =>
            {
                try
                {
                    const string message = "HealthCheck Status OK";
                    //validate Database Connection (read method)
                    appService.GetAll();

                    logger.LogInformation(message);

                    return Ok(message);
                }
                catch (Exception ex)
                {
                    return StatusCode((int)HttpStatusCode.InternalServerError, new { ex.Message });
                }
            }));
        }
示例#4
0
 public async Task <IEnumerable <PersonaViewModel> > GetAll()
 {
     return(await appService.GetAll());
 }
 public IActionResult Get()
 {
     return(Ok(appService.GetAll()));
 }
示例#6
0
 public IEnumerable <PersonaViewModel> GetAll()
 {
     return(appService.GetAll());
 }