Exemplo n.º 1
0
        public Restaurant Update(Restaurant restaurant)
        {
            _context.Attach(restaurant).State = EntityState.Modified;
            _context.SaveChanges();

            return(restaurant);
        }
Exemplo n.º 2
0
        public Resturant Update(Resturant ResturantToEdit)
        {
            var entity = db.Attach(ResturantToEdit);

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