public ActionResult DeleteConfirmed(int id) { WordSound wordSound = db.WordSounds.Find(id); db.WordSounds.Remove(wordSound); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,IsReadOnly,IsBlocked,WordId,SoundUrl")] WordSound wordSound) { if (ModelState.IsValid) { db.Entry(wordSound).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.WordId = new SelectList(db.Words, "Id", "Text", wordSound.WordId); return(View(wordSound)); }
// GET: WordSounds/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } WordSound wordSound = db.WordSounds.Find(id); if (wordSound == null) { return(HttpNotFound()); } return(View(wordSound)); }
// GET: WordSounds/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } WordSound wordSound = db.WordSounds.Find(id); if (wordSound == null) { return(HttpNotFound()); } ViewBag.WordId = new SelectList(db.Words, "Id", "Text", wordSound.WordId); return(View(wordSound)); }