public ActionResult LearningParametersForm(int id) { ITProjektasDB db = new ITProjektasDB(); Search_parameters param = db.Search_parameters.SingleOrDefault(x => x.id_Search_parameters == id); return(View(param)); }
public ActionResult Update(Search_parameters updatedParameters) { ITProjektasDB db = new ITProjektasDB(); Search_parameters notupdatedParameters = db.Search_parameters.SingleOrDefault( x => x.id_Search_parameters == updatedParameters.id_Search_parameters ); if (notupdatedParameters != null) { db.Entry(notupdatedParameters).CurrentValues.SetValues(updatedParameters); } db.SaveChanges(); return(RedirectToAction("GetLearningParameters", "LearningParameters")); }