Exemplo n.º 1
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         string idAsString = collection.Get("storyId");
         _StoryService.DeleteStory(Int32.Parse(idAsString));
         return(RedirectToAction("ListByPriority", new { displayPartial = true }));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
        public void DeleteStory()
        {
            ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities();
            StoryService      storyService      = new StoryService(scrumTimeEntities);
            Story             story             = new Story()
            {
                Narrative     = "Test story for deletion test.",
                Points        = 8,
                Priority      = 2,
                ProductId     = 1,
                UserDefinedId = "not set"
            };

            storyService.SaveStory(story);

            storyService.DeleteStory(story.StoryId);
        }