Ejemplo n.º 1
0
        public void AddBaking(Baking d)

        {
            if (context.catalog.products.ContainsKey(d.Id))
            {
                throw new Exception("No such baking in our shop");
            }
            context.catalog.products.Add(d.Id, d);
        }
Ejemplo n.º 2
0
 public void UpdateBakingInfo(Baking D)
 {
     if (context.catalog.products.ContainsKey(D.Id))
     {
         context.catalog.products[D.Id].Price = D.Price;
         context.catalog.products[D.Id].Type  = D.Type;
         return;
     }
     throw new Exception("No such baking in our shop");
 }