コード例 #1
0
        public async Task <IActionResult> GetAllMenuItems(String restaurantName, String menuName)
        {
            var getAllMenuItemsExpr = from selectRestaurant in RestaurantDomain.GetRestaurant(restaurantName)
                                      let restaurant = (selectRestaurant as RestaurantSelected)?.RestaurantAgg
                                                       from selectMenu in RestaurantDomain.GetMenu(menuName, restaurant.Restaurant.Id)
                                                       let menu = (selectMenu as MenuSelected)?.MenuAgg
                                                                  from getAllMenus in RestaurantDomain.GetAllMenuItems(menu.Menu.Id)
                                                                  select getAllMenus;

            return(Ok(await interpreter.Interpret(getAllMenuItemsExpr, Unit.Default)));
        }