public JsonResult MakeFalse() { CookingSiteDBEntities db = new CookingSiteDBEntities(); var relaceQuery = from key in db.Terms where key.IsMatch == true select key;
//This method is called by a JSON method in the terms controller and sets the IsMatch bool in the terms table to false. public JsonResult MakeFalse() { CookingSiteDBEntities db = new CookingSiteDBEntities(); var relaceQuery = from key in db.Terms where key.IsMatch == true select key; foreach (Term key in relaceQuery) { if (key.IsMatch == true) { key.IsMatch = false; } } db.SaveChanges(); return(new JsonResult()); }