public Details UpdateDetails(Details details) { var updateDetails = new Details() { CustomerId = details.CustomerId, OrderId = this.GetOrderId(details.CustomerId) }; { _db.Details.Attach(updateDetails); _db.Entry(updateDetails).Property(x => x.OrderId).IsModified = true; _db.SaveChanges(); } return(details); }
public bool UpdateProduct(Product product) { _db.Entry(product).State = EntityState.Modified; _db.SaveChanges(); return(product != null); }