public ActionResult DeleteConfirmed(int id) { TestSQLite testSQLite = db.TestStuff.Find(id); db.TestStuff.Remove(testSQLite); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,number,word")] TestSQLite testSQLite) { if (ModelState.IsValid) { db.Entry(testSQLite).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testSQLite)); }
public ActionResult Create([Bind(Include = "ID,number,word")] TestSQLite testSQLite) { if (ModelState.IsValid) { db.TestStuff.Add(testSQLite); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testSQLite)); }
// GET: TestSQLites/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TestSQLite testSQLite = db.TestStuff.Find(id); if (testSQLite == null) { return(HttpNotFound()); } return(View(testSQLite)); }