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

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

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

            return(Ok(result));
        }