public IActionResult Person(int?id) { PersonDto output = null; if (id.HasValue) { output = _personAppService.GetById(id.Value); } return(View(output)); }
public async Task <IActionResult> Edit(Guid?id) { if (id == null) { return(NotFound()); } var personViewModel = await _personAppService.GetById(id.Value); if (personViewModel == null) { return(NotFound()); } return(View(personViewModel)); }
public IActionResult GetById(int id) { var person = _personAppService.GetById(id); var personMapped = Mapper.Map <Models.Person>(person); return(Ok(person)); }
public IActionResult Details(long?id) { try { if (id == null) { return(NotFound()); } var person = _personAppService.GetById(id.Value); if (person == null) { return(NotFound()); } return(Ok(person)); } catch (Exception ex) { _logger.LogError(ex.Message); return(BadRequest("Error while processing your request!")); } }
public IActionResult GetById(int id) { var personViewModel = personAppService.GetById(id); return(Response(personViewModel)); }
public async Task <PersonViewModel> Get(Guid id) { return(await _personAppService.GetById(id)); }
public IActionResult Get(Guid id) { var viewModel = _personAppService.GetById(id); return(Response(viewModel)); }