public ActionResult PrecisionMachineryEditSubmit(BasePrecisionMachineryEditViewModel edit_PrecisionMachinery) { var precisionMachinery = db.PrecisionMachinery.Find(edit_PrecisionMachinery.Id); precisionMachinery.Title = edit_PrecisionMachinery.Title; precisionMachinery.Content = edit_PrecisionMachinery.Content; db.SaveChanges(); return RedirectToAction("PrecisionMachinery"); }
public ActionResult PrecisionMachineryEdit(int id) { var precisionMachinery = db.PrecisionMachinery.Find(id); BasePrecisionMachineryEditViewModel _precisionMachinery = new BasePrecisionMachineryEditViewModel { Title = precisionMachinery.Title, Content = precisionMachinery.Content }; return View(_precisionMachinery); }