예제 #1
0
        public Order UpdateOrder(Order order)
        {
            var entry = _db.Entry(order);

            entry.State = EntityState.Modified;
            return(order);
        }
예제 #2
0
        public Product UpdateProduct(Product product)
        {
            var entry = _db.Entry(product);

            entry.State = EntityState.Modified;
            return(product);
        }
예제 #3
0
 public virtual async Task <bool> Update(T entity)
 {
     _db.Entry(entity).State = EntityState.Modified;
     return(await _db.SaveChangesAsync() > 0);
 }
예제 #4
0
 public Cart Update(Cart cart)
 {
     _db.Carts.Attach(cart);
     _db.Entry(cart).State = EntityState.Modified;
     return(cart);
 }