コード例 #1
0
        public JsonResult UpdateRestaurant(Restaurant.Core.Restaurant restaurant)
        {
            _dbContext.Entry(restaurant).State = System.Data.Entity.EntityState.Modified;
            _dbContext.SaveChanges();

            return(GetRestaurants());
        }
コード例 #2
0
        public JsonResult AddRestaurant(Restaurant.Core.Restaurant restaurant)
        {
            _dbContext.Restaurants.Add(restaurant);
            _dbContext.SaveChanges();

            return(GetRestaurants());
        }