public Restaurant Update(Restaurant restaurant)
 {
     _context.Attach(restaurant).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     _context.SaveChanges();
     return(Get(restaurant.Id));
 }
예제 #2
0
 public Restaurant Update(Restaurant restaurant)
 {
     _context.Attach(restaurant).State = EntityState.Modified;
     _context.SaveChanges();
     return(restaurant);
 }
        public void Update(Restaurant restaurant)
        {
            _dbContext.Attach(restaurant).State = EntityState.Modified;

            _dbContext.SaveChanges();
        }