public async Task <ActionResult> DeleteConfirmed(int id) { Crestron101CoursesContentTypes crestron101CoursesContentTypes = await db.Crestron101CoursesContentTypes.FindAsync(id); db.Crestron101CoursesContentTypes.Remove(crestron101CoursesContentTypes); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name")] Crestron101CoursesContentTypes crestron101CoursesContentTypes) { if (ModelState.IsValid) { db.Entry(crestron101CoursesContentTypes).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(crestron101CoursesContentTypes)); }
public async Task <ActionResult> Create([Bind(Include = "Id,Name")] Crestron101CoursesContentTypes crestron101CoursesContentTypes) { if (ModelState.IsValid) { db.Crestron101CoursesContentTypes.Add(crestron101CoursesContentTypes); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(crestron101CoursesContentTypes)); }
// GET: Crestron101CoursesContentTypes/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Crestron101CoursesContentTypes crestron101CoursesContentTypes = await db.Crestron101CoursesContentTypes.FindAsync(id); if (crestron101CoursesContentTypes == null) { return(HttpNotFound()); } return(View(crestron101CoursesContentTypes)); }