public async Task <IActionResult> Get() { var res = await _salutationRepository.GetAllAsync(); var model = _Mapper.Map <IEnumerable <SalutationDTO> >(res); return(Ok(model)); }
// GET: Salutations public async Task <IActionResult> Index() { var res = await _salutationRepository.GetAllAsync(); var model = _Mapper.Map <IEnumerable <SalutationViewmodel> >(res); return(View(model)); }
public async Task <IEnumerable <SalutationModel> > GetSalutationsAsync() { var salutations = await _salutationRepository.GetAllAsync(); var models = _mapper.Map <IEnumerable <SalutationModel> >(salutations); return(models); }