public override void DeleteChapter(string chapterId)
        {
            try
            {
                using (TransactionScope transaction = new TransactionScope(mConfiguration))
                {
                    ChapterDataStore dataStore = new ChapterDataStore(transaction);
                    dataStore.Delete(chapterId);

                    ChapterVersionDataStore dsChapVersion  = new ChapterVersionDataStore(transaction);
                    IList <ChapterVersion>  chVersionsList = dsChapVersion.FindAllItems(chapterId);

                    foreach (ChapterVersion item in chVersionsList)
                    {
                        item.Deleted = true;
                        dsChapVersion.Update(item);
                    }

                    transaction.Commit();
                }
            }
            catch
            {
                throw new NotImplementedException();
            }
        }
 public override IList <Chapter> GetAllChapters(string articleId)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         ChapterDataStore chapter = new ChapterDataStore(transaction);
         return(chapter.FindAllItems(articleId));
     }
 }
 public override void UpdateChapter(Chapter chapter)
 {
     using (TransactionScope transaction = new TransactionScope(mConfiguration))
     {
         ChapterDataStore dataStore = new ChapterDataStore(transaction);
         dataStore.Update(chapter);
         transaction.Commit();
     }
 }
        public override Chapter CreateChapter(string docId, string chapterName)
        {
            if (!CheckChapterName(docId, chapterName))
            {
                using (TransactionScope transaction = new TransactionScope(mConfiguration))
                {
                    ChapterDataStore dataStore = new ChapterDataStore(transaction);
                    Chapter          chapter   = new Chapter(docId);

                    dataStore.Insert(chapter);
                    transaction.Commit();

                    return(chapter);
                }
            }
            return(new Chapter());
        }