public ActionResult Create( manualAssignementViewModel viewmodel) { if (ModelState.IsValid) { db.manualAssign_tweetRandomSample2_to_geonamesRestricted.Add(viewmodel.manualAssign); db.SaveChanges(); return RedirectToAction("Index"); } else { var errors = ModelState .Where(x => x.Value.Errors.Count > 0) .Select(x => new { x.Key, x.Value.Errors }) .ToArray(); } return View(viewmodel.manualAssign); }
// GET: /_geoNamesRestricted/ public PartialViewResult _geoNamesRestricted(string q) { var manualAssignementView = new manualAssignementViewModel(); List<contains_search_geoNamesRestricted_Result> list1 = (db.contains_search_geoNamesRestricted("\""+ q +"\"")).ToList(); List<contains_search_alternateNames3Join_Result> list2 = (db.contains_search_alternateNames3Join("\""+ q +"\"")).ToList(); manualAssignementView.containsSearchGeoNamesRestricted = list1; manualAssignementView.containsSearchAlternateNames3 = list2; return this.PartialView(manualAssignementView); }
// GET: /manualAssignment/ public ActionResult Index() { List<get_tweetRandomSample2_notProcessed_Result> tweetRandomSampleList = db.get_tweetRandomSample2_notProcessed().ToList(); var manualAssignementView = new manualAssignementViewModel(); List<contains_search_geoNamesRestricted_Result> list1 = (db.contains_search_geoNamesRestricted("\"" + tweetRandomSampleList.First().userlocation + "\"")).ToList(); List<contains_search_alternateNames3Join_Result> list2 = (db.contains_search_alternateNames3Join("\"" + tweetRandomSampleList.First().userlocation + "\"")).ToList(); manualAssignementView.containsSearchGeoNamesRestricted = list1; manualAssignementView.containsSearchAlternateNames3 = list2; manualAssignementView.tweetRandomSample2 = tweetRandomSampleList; return View(manualAssignementView); }