Example #1
0
        public async Task <IActionResult> Get()
        {
            var res = await _salutationRepository.GetAllAsync();

            var model = _Mapper.Map <IEnumerable <SalutationDTO> >(res);

            return(Ok(model));
        }
Example #2
0
        // GET: Salutations
        public async Task <IActionResult> Index()
        {
            var res = await _salutationRepository.GetAllAsync();

            var model = _Mapper.Map <IEnumerable <SalutationViewmodel> >(res);

            return(View(model));
        }
Example #3
0
        public async Task <IEnumerable <SalutationModel> > GetSalutationsAsync()
        {
            var salutations = await _salutationRepository.GetAllAsync();

            var models = _mapper.Map <IEnumerable <SalutationModel> >(salutations);

            return(models);
        }