public async Task <IActionResult> GetOrders(string restaurantName) { var getRestaurant = from restaurantResult in RestaurantDomainEx.GetRestaurant(restaurantName) select restaurantResult; var restaurantAgg = await _interpreter.Interpret(getRestaurant, Unit.Default); var getOrdersExpr = from ordersResult in RestaurantDomain.GetRestaurantOrders(restaurantAgg.Restaurant) select ordersResult; var orders = await _interpreter.Interpret(getOrdersExpr, Unit.Default); return(orders.Match( found => (IActionResult)Ok(found.Orders), notFound => NotFound())); }