// GET: Salutations/Details/5 public async Task <IActionResult> Details(int?id, SalutationViewmodel vm) { if (id == null) { return(NotFound()); } var salutation = await _salutationRepository.GetByIdAsync(id); _Mapper.Map(vm, salutation); if (salutation == null) { return(NotFound()); } return(View(_Mapper.Map <SalutationViewmodel>(salutation))); }
public async Task <IActionResult> Details(int?id, SalutationDTO dto) { if (id == null) { return(NotFound()); } var salutation = await _salutationRepository.GetByIdAsync(id); var sal = _Mapper.Map <SalutationDTO>(salutation); if (salutation == null) { return(NotFound()); } return(Ok(sal)); }