public IEnumerable<ScrumStoryServiceModel> getStoriesByClassification(string text) { ScrumStoryRepository repo = new ScrumStoryRepository(entities); IEnumerable<ScrumStory> stories = repo.getStoriesByClassification(ScrumUtil.mapClassificationToScrum(text)); List<ScrumStoryServiceModel> models = new List<ScrumStoryServiceModel>(); foreach (ScrumStory story in stories) { models.Add(ScrumUtil.mapScrumStoryEntityToModel(story)); } return models; }
public IEnumerable<ScrumStoryServiceModel> getStoriesByKeywordAcceptanceCriteria(string text) { ScrumStoryRepository repo = new ScrumStoryRepository(entities); IEnumerable<ScrumStory> stories = repo.getStoriesByKeywordAcceptanceCriteria(text); List<ScrumStoryServiceModel> models = new List<ScrumStoryServiceModel>(); foreach (ScrumStory story in stories) { models.Add(ScrumUtil.mapScrumStoryEntityToModel(story)); } return models; }
public IEnumerable<ScrumStoryServiceModel> getStoriesByBlocked(bool blocked) { ScrumStoryRepository repo = new ScrumStoryRepository(entities); IEnumerable<ScrumStory> stories = repo.getStoriesByBlocked(blocked); List<ScrumStoryServiceModel> models = new List<ScrumStoryServiceModel>(); foreach (ScrumStory story in stories) { models.Add(ScrumUtil.mapScrumStoryEntityToModel(story)); } return models; }
public bool deleteScrumStory(int id) { ScrumStoryRepository repo = new ScrumStoryRepository(entities); ScrumStory story = repo.Get(id); try { repo.Delete(story); return true; } catch (Exception ex) { _errorMessage = ex.Message; return false; } }
public ScrumStoryServiceModel getScrumStory(int id) { ScrumStoryRepository repo = new ScrumStoryRepository(entities); ScrumStory story = repo.Get(id); return ScrumUtil.mapScrumStoryEntityToModel(story); }
public int updateScrumStory(ScrumStoryServiceModel scrumStory) { ScrumStoryRepository repo = new ScrumStoryRepository(entities); throw new NotImplementedException(); }
public int insertScrumStory(ScrumStoryServiceModel scrumStory) { ScrumStoryRepository repo = new ScrumStoryRepository(); ScrumStory model = new ScrumStory(); model.AcceptanceCriteria = scrumStory.acceptanceCriteria; model.Blocked = scrumStory.blocked; model.Classification = ScrumUtil.mapClassificationToScrum(scrumStory.classification); model.CreateDate = DateTime.Now; model.Description = scrumStory.description; model.Id = 0; model.LastUpdatedDate = DateTime.Now; model.Points = scrumStory.points; model.Priority = ScrumUtil.mapPriorityToScrum(scrumStory.priority); model.Release = scrumStory.release; model.Sprint = scrumStory.sprint; model.Status = ScrumUtil.mapStatusToScrum(scrumStory.status); model.Subject = scrumStory.subject; model.Type = ScrumUtil.mapTypeToScrum(scrumStory.status); model.WorkNotes = scrumStory.workNotes; return repo.Insert(model); }