示例#1
0
        //public IEnumerable<HasToppings> GetHasToppings()
        //{
        //    // we don't need to track changes to these, so
        //    // skip the overhead of doing so
        //    List<HasToppings> hasToppings = _db.HasToppings.AsNoTracking().ToList();
        //    return hasToppings;
        //}


        public void AddHasTopping(int?pizzaId, int locationId)
        {
            var hasTopping = new HasToppings
            {
                PizzaId    = pizzaId,
                LocationId = locationId
            };

            _db.Add(hasTopping);
            SaveChanges();
        }
示例#2
0
 public void Edit(HasToppings hasTopping)
 {
     //updates the current orderPizza
     _db.Update(hasTopping);
 }