public async Task <ActionResult> DeleteConfirmed(int id) { TopicConcept topicConcept = await db.TopicConcepts.FindAsync(id); db.TopicConcepts.Remove(topicConcept); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "ID,Name,Order,PhaseID")] TopicConcept topicConcept) { if (ModelState.IsValid) { db.Entry(topicConcept).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(topicConcept)); }
public async Task <ActionResult> Create([Bind(Include = "ID,Name,Order,PhaseID")] TopicConcept topicConcept) { if (ModelState.IsValid) { db.TopicConcepts.Add(topicConcept); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(topicConcept)); }
// GET: TopicConcepts/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TopicConcept topicConcept = await db.TopicConcepts.FindAsync(id); if (topicConcept == null) { return(HttpNotFound()); } return(View(topicConcept)); }
// GET: TopicConcepts/Edit/5 public async Task <ActionResult> Edit(int?id) { ViewBag.PhaseID = new SelectList(db.Phases, "ID", "Name"); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TopicConcept topicConcept = await db.TopicConcepts.FindAsync(id); if (topicConcept == null) { return(HttpNotFound()); } return(View(topicConcept)); }