Example #1
0
        public Restaurant Update(Restaurant restaurant)
        {
            _context.Attach(restaurant).State = EntityState.Modified;
            _context.SaveChanges();

            return(restaurant);
        }
        public Resturant Update(Resturant ResturantToEdit)
        {
            var entity = db.Attach(ResturantToEdit);

            entity.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            return(ResturantToEdit);
        }
Example #3
0
 public Restaurant Update(Restaurant restaurant)
 {
     _context.Attach(restaurant).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     _context.SaveChanges();
     return(restaurant);
 }