Esempio n. 1
0
        public async Task <IActionResult> Get(int personId)
        {
            var person = await _personsService.GetPersonAsync(personId);

            if (person == null)
            {
                return(this.ErrorObject(404, $"Person (id: {personId}) is not found"));
            }

            return(this.SingleObject(person));
        }
Esempio n. 2
0
 public Task <PersonDto> Get(int personId)
 {
     return(_personsService.GetPersonAsync(personId, HttpContext.RequestAborted));
 }