public ActionResult Edit(Orders orders) { if (ModelState.IsValid) { _orders.Update(orders); return(RedirectToAction("Index")); } return(View(orders)); }
public JsonResult UpdateOrder(OrderValidation order, int id) { if (ModelState.IsValid) { using (OrdersData db = new OrdersData()) { return(Json(db.Update(_order => _order.Id == id, order))); } } return(Json(false)); }