public ActionResult DeleteConfirmed(int id) { AreaOfKnowledge areaOfKnowledge = db.AreasOfKnowledge.Find(id); db.AreasOfKnowledge.Remove(areaOfKnowledge); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AreaOfKnowledgeID,AreaOfKnowledgeName,Description,UserId")] AreaOfKnowledge areaOfKnowledge) { if (ModelState.IsValid) { db.Entry(areaOfKnowledge).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(areaOfKnowledge)); }
public ActionResult Create([Bind(Include = "AreaOfKnowledgeID,AreaOfKnowledgeName,Description,UserId")] AreaOfKnowledge areaOfKnowledge) { if (ModelState.IsValid) { db.AreasOfKnowledge.Add(areaOfKnowledge); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(areaOfKnowledge)); }
// GET: AreaOfKnowledges/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AreaOfKnowledge areaOfKnowledge = db.AreasOfKnowledge.Find(id); if (areaOfKnowledge == null) { return(HttpNotFound()); } return(View(areaOfKnowledge)); }