public ActionResult Delete(int id, FormCollection collection) { try { Models.Story story = new Models.Story(); foreach (Models.StoryBlock block in story.blockList) { if (block.id == id) { story.blockList.Remove(block); story.Delete(block, storyId); break; } } return(RedirectToAction("Index", new { id = storyId, clgId = collageId })); } catch { return(View()); } }
public ActionResult Delete(int id, FormCollection collection) { try { Models.Story story = new Models.Story(); foreach (Models.StoryBlock block in story.blockList) { if (block.id == id) { story.blockList.Remove(block); story.Delete(block, storyId); break; } } return RedirectToAction("Index", new { id = storyId, clgId = collageId }); } catch { return View(); } }