public ActionResult editOrder(Order orderData) { orderData.UserID = currentUserID; orderData.Date = DateTime.Today; // db.Entry(orderData).State = System.Data.Entity.EntityState.Modified ; db.Set <Order>().AddOrUpdate(orderData); db.SaveChanges(); return(RedirectToAction("Transaction", "OrderTransaction")); }