Exemple #1
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         Models.StoryCollection StoryCollection = new Models.StoryCollection();
         foreach (Models.Collage collage in StoryCollection.CollectionList)
         {
             if (collage.id == id)
             {
                 StoryCollection.CollectionList.Remove(collage);
                 StoryCollection.Delete(collage);
                 break;
             }
         }
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         Models.StoryCollection StoryCollection = new Models.StoryCollection();
         foreach (Models.Collage collage in StoryCollection.CollectionList)
         {
             if (collage.id == id)
             {
                 StoryCollection.CollectionList.Remove(collage);
                 StoryCollection.Delete(collage);
                 break;
             }
         }
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }