Example #1
0
        public async Task <IActionResult> GetMenus(int foodTruckId)
        {
            var menus = await _repo.GetMenus(foodTruckId);

            // use AutoMapper to map DTO <destination> to Model (source)
            var menusToReturn = _mapper.Map <IEnumerable <MenuForListDTO> >(menus);

            return(Ok(menusToReturn));
        }