Exemple #1
0
        public ActionResult AddStory(Guid projectId, Guid sprintId, string description)
        {
            Guid storyId = Guid.NewGuid();
            var  cmd     = new AddNewStoryToSprint(projectId, sprintId, storyId, description);
            var  service = new ScrumrCommandServiceClient();

            service.ExecuteCommand(cmd);

            return(Json(storyId));
        }
        public void Handle(AddNewStoryToSprint evnt)
        {
            using (var context = new ReadModelContainer())
            {
                var sprint   = context.Sprints.Single(s => s.Id == evnt.SprintId);
                var newStory = new Story
                {
                    Id          = evnt.StoryId,
                    Description = evnt.Description,
                    Sprint      = sprint
                };

                context.AddToStories(newStory);
                context.SaveChanges();
            }
        }
Exemple #3
0
 protected void OnAddNewStory(AddNewStoryToSprint e)
 {
     _stories.Add(new Story(ParentAggregateRoot, this, e.StoryId, e.Description));
 }
Exemple #4
0
 protected void OnAddNewStory(AddNewStoryToSprint e)
 {
     _stories.Add(new Story(ParentAggregateRoot, this, e.StoryId, e.Description));
 }