public override string GetDescription() { if (Beverage != null) { return(Beverage.GetDescription() + " + " + base.GetDescription()); } else { throw null; } }
public OrderItem AddOrderItem(OrderItem item) { Beverage beverage = _ctx.Beverages .Include(b => b.BeverageSales) .ThenInclude(b => b.Sale) .Where(b => b.Id == item.BeverageId) .FirstOrDefault(); item.Description = beverage.GetDescription(); item.UnitPrice = beverage.GetCost(); _ctx.OrderItems.Add(item); _ctx.SaveChanges(); return(item); }
public Order CreateOrder(Order order) { foreach (OrderItem item in order.Items) { Beverage beverage = _ctx.Beverages .Include(b => b.BeverageSales) .ThenInclude(b => b.Sale) .Where(b => b.Id == item.BeverageId) .FirstOrDefault(); item.Description = beverage.GetDescription(); item.UnitPrice = beverage.GetCost(); } _ctx.Orders.Add(order); _ctx.SaveChanges(); return(order); }
public override string GetDescription() { return(beverage.GetDescription() + ", Soy"); }
public override string GetDescription() => $"{_beverage.GetDescription()}, Whip";
public override string GetDescription() { return(beverage.GetDescription() + ", Steamed Milk"); }
public override string GetDescription() { return(String.Format("{0}, {1}", _beverage.GetDescription(), Description)); }
public override string GetDescription() { return(beverage.GetDescription() + ", " + this.GetType().Name.ToString()); }
public Discount(int discount, Beverage beverage) : base(beverage) { this.discount = (double)(100 - discount) / 100; description = beverage.GetDescription() + " [discount]"; }
public override string GetDescription() { return($"{beverage.GetDescription()}, Whip"); }
public override string GetDescription() { return(WrappedBeverage.GetDescription()); }
public Whip(Beverage beverage) { this.beverage = beverage; description = beverage.GetDescription() + ", Whip"; }
public Mocha(Beverage berBeverage) { this.berBeverage = berBeverage; description = berBeverage.GetDescription() + ", Mocha"; }
public override string GetDescription() { return(_beverage.GetDescription() + "with chocolate"); }
public Mocha(Beverage beverage) : base(beverage) { description = beverage.GetDescription() + ", Mocha"; }
public Soya(Beverage beverage) { this.beverage = beverage; Description = beverage.GetDescription() + ", Soya"; }
public override string GetDescription() => beverage.GetDescription() + ", Whip";
public override string GetDescription() { return(string.Join(" + ", beverage.GetDescription(), "Maple Syrup")); }
public override string GetDescription() { return beverage.GetDescription() + ", Whip"; }
public override string GetDescription() => beverage.GetDescription() + ", Mocha";
public override string GetDescription() { return(_Beverage.GetDescription() + ", " + _Description); }
public override string GetDescription() { return(_beverage.GetDescription() + " with milk"); }
public SteamedMilk(Beverage beverage) { this.beverage = beverage; Description = beverage.GetDescription() + ", Steamed Milk"; }
public override string GetDescription() => $"{_beverage.GetDescription()} with Whipped Cream";
public override string GetDescription() { return($"{_beverage.GetDescription()}, Mocha"); }
public override string GetDescription() { return(m_Beverage.GetDescription() + " 휘핑 크림"); }
public override string GetDescription() { return(_beverage.GetDescription() + " Venti"); }
public override string GetDescription() { return(Beverage.GetDescription() + ", Milk"); }
public override string GetDescription() { return(_beverage.GetDescription() + _description); }
public override string GetDescription() => $"{beverage.GetDescription()}, Soy";