public async Task <IEnumerable <KudosShopItemViewModel> > GetKudosShopItems() { var userOrganization = GetUserAndOrganization(); var kudosShopItemsTask = await _kudosShopService.GetAllItemsAsync(userOrganization); var kudosShopItems = _mapper.Map <IEnumerable <KudosShopItemDto>, IEnumerable <KudosShopItemViewModel> >(kudosShopItemsTask); return(kudosShopItems); }
public async Task <IHttpActionResult> GetAllItems() { var userOrganization = GetUserAndOrganization(); var allListDto = await _kudosShopService.GetAllItemsAsync(userOrganization); var result = _mapper.Map <IEnumerable <KudosShopItemDto>, IEnumerable <KudosShopItemViewModel> >(allListDto); return(Ok(result)); }