//public void Update(Restaurant_FoodCategory RestaurantFoodCategory) //{ // Restaurant_FoodCategory foodCat = this.context.Restaurant_FoodCategory.SingleOrDefault(x=> x.Id == RestaurantFoodCategory.Id); // foodCat. //} public void DeleteByRestaurant(int restaurantID) { Restaurant_FoodCategory foodCat = this.context.Restaurant_FoodCategory.SingleOrDefault(x => x.Id == restaurantID); this.context.Restaurant_FoodCategory.Remove(foodCat); this.context.SaveChanges(); }
public void Insert(Restaurant_FoodCategory Restaurant_FoodCategory) { this.data.Insert(Restaurant_FoodCategory); }
public void Insert(Restaurant_FoodCategory Restaurant_FoodCategory) { this.context.Restaurant_FoodCategory.Add(Restaurant_FoodCategory); this.context.SaveChanges(); }