Ejemplo n.º 1
0
        public string CreateUserStory(ServiceModel.UserStory userStory)
        {
            var dataUserStory = new UserStory(userStory.Title, userStory.Description);

            dataUserStory.Project = projectRepository.GetByID(userStory.ProjectId);
            repository.Insert(dataUserStory);
            dataUserStory.Priority = (dataUserStory.Project.ProjectUserStories.Count());
            repository.Save();
            return(dataUserStory.Id.ToString());
        }
Ejemplo n.º 2
0
        public void UpdateUserStory(string userStoryId, ServiceModel.UserStory userStory)
        {
            var dataUserStory = repository.GetByID(userStoryId);

            dataUserStory.Title       = userStory.Title;
            dataUserStory.Description = userStory.Description;
            dataUserStory.StoryPoints = userStory.StoryPoints;
            dataUserStory.MarketValue = userStory.MarketValue;
            dataUserStory.Priority    = userStory.Priority;
            if (userStory.SprintId != null)
            {
                dataUserStory.Sprint = sprintRepository.GetByID(userStory.SprintId);
            }
            repository.Save();
        }