public decimal GetCartTotal() { return(cart.Join( mealsService.GetAll(), cartItem => cartItem.ItemId, meal => meal.Id, (c, m) => new { c.Quantity, m.Price }) .Sum(item => item.Price * item.Quantity)); }
public ActionResult Get() { var meals = _mealsService.GetAll(); return(Ok(meals)); }