public void DeleteSingle(int id) { restaurantItem restItem = this.context.restaurantItems.SingleOrDefault(x => x.Id == id); this.context.restaurantItems.Remove(restItem); this.context.SaveChanges(); }
public void Update(restaurantItem restaurant_Item) { restaurantItem restItem = this.context.restaurantItems.SingleOrDefault(x => x.Id == restaurant_Item.Id); restItem.itemPrice = restaurant_Item.itemPrice; restItem.itemName = restaurant_Item.itemName; this.context.SaveChanges(); }
public void Update(restaurantItem restaurantItem) { this.data.Update(restaurantItem); }
public void Insert(restaurantItem restaurantItem) { this.data.Insert(restaurantItem); }
public void Insert(restaurantItem restaurantItem) { this.context.restaurantItems.Add(restaurantItem); this.context.SaveChanges(); }