public int insertScrumTheme(ScrumThemeServiceModel scrumEpic)
 {
     ScrumThemeRepository repo = new ScrumThemeRepository(entities);
     ScrumTheme model = new ScrumTheme();
     model.CreateDate = scrumEpic.createdDate;
     model.LastUpdatedDate = scrumEpic.lastUpdatedDate;
     model.Subject = scrumEpic.subject;
     model.Id = 0;
     return repo.Insert(model);
 }
        public IEnumerable<ScrumThemeServiceModel> getThemesByKeywordSubject(string text)
        {
            ScrumThemeRepository repo = new ScrumThemeRepository(entities);
            IEnumerable<ScrumTheme> themes = repo.getThemesByKeywordSubject(text);
            List<ScrumThemeServiceModel> models = new List<ScrumThemeServiceModel>();

            foreach (ScrumTheme theme in themes) {
                models.Add(ScrumUtil.mapScrumThemeEntityToModel(theme));
            }

            return models;
        }
        public bool deleteScrumTheme(int id)
        {
            ScrumThemeRepository repo = new ScrumThemeRepository(entities);
            ScrumTheme scrumTheme = repo.Get(id);

            try {
                repo.Delete(scrumTheme);
                return true;
            }
            catch (Exception ex) {
                _errorMessage = ex.Message;
                return false;
            }
        }
 public int updateScrumTheme(ScrumThemeServiceModel scrumEpic)
 {
     ScrumThemeRepository repo = new ScrumThemeRepository(entities);
     throw new NotImplementedException();
 }
 public ScrumThemeServiceModel getScrumTheme(int id)
 {
     ScrumThemeRepository repo = new ScrumThemeRepository(entities);
     ScrumTheme scrumTheme = repo.Get(id);
     return ScrumUtil.mapScrumThemeEntityToModel(scrumTheme);
 }