示例#1
0
        public async Task <IActionResult> GetMenuItems()
        {
            var menuItems = await _repo.GetMenuItems();

            var menuItemsToReturn = _mapper.Map <IEnumerable <MenuItemForListDto> >(menuItems);

            return(Ok(menuItemsToReturn));
        }
 public IEnumerable <MenuItem> GetMenuItems()
 {
     return(_menuItemRepository.GetMenuItems());
 }