public JsonResult UpdateRestaurant(Restaurant.Core.Restaurant restaurant) { _dbContext.Entry(restaurant).State = System.Data.Entity.EntityState.Modified; _dbContext.SaveChanges(); return(GetRestaurants()); }
public JsonResult AddRestaurant(Restaurant.Core.Restaurant restaurant) { _dbContext.Restaurants.Add(restaurant); _dbContext.SaveChanges(); return(GetRestaurants()); }