public ActionResult DeleteConfirmed(int id) { Topicvocabulary topicvocabulary = db.Topicvocabularies.Find(id); db.Topicvocabularies.Remove(topicvocabulary); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Idtopic,Name,Description")] Topicvocabulary topicvocabulary) { if (ModelState.IsValid) { db.Entry(topicvocabulary).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(topicvocabulary)); }
public ActionResult Create([Bind(Include = "Idtopic,Name,Description")] Topicvocabulary topicvocabulary) { if (ModelState.IsValid) { db.Topicvocabularies.Add(topicvocabulary); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(topicvocabulary)); }
// GET: Topicvocabularies/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Topicvocabulary topicvocabulary = db.Topicvocabularies.Find(id); if (topicvocabulary == null) { return(HttpNotFound()); } return(View(topicvocabulary)); }