Пример #1
0
        public IActionResult Get(long id)
        {
            var citizen = _citizenService.GetById(id);

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

            return(Ok(citizen));
        }
Пример #2
0
 public async Task <ActionResult <Citizen> > GetById(long id)
 {
     return(Ok(await _citizenService.GetById(id)));
 }