public async Task AddOrder(Badge badge) { var Order = new Order(); var OrderDtl = new OrderDetails(); var sugar = new Sugar(drinkOrder.Quantity); Order.Badge = badge; await order.AddOrder(Order); OrderDtl.Drink = await drinks.GetDrinkById(drinkOrder.DrinkId); OrderDtl.Mug = drinkOrder.Mug; sugar.Add(OrderDtl); await orderDetail.Add(OrderDtl, Order.Badge.Id); }
/// <summary> /// Adds a sugar to the sugar cache. /// </summary> /// <param name="sugar">The given sugar.</param> public void Add(Sugar sugar) => Sugar.Add(sugar);