Example #1
0
        public IActionResult GetAll()
        {
            IEnumerable <Citizen> citizens = _citizenService.GetAll();

            if (citizens == null)
            {
                return(NotFound());
            }

            return(Ok(citizens));
        }
Example #2
0
 public IEnumerable <CitizenDto> Get()
 {
     return(_citizenService.GetAll());
 }
Example #3
0
        public async Task <ActionResult <IEnumerable <Citizen> > > GetAll()
        {
            var result = await _citizenService.GetAll();

            return(Ok(result));
        }