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 void UpdateChapterVersion(ChapterVersion chapterVers) { using (TransactionScope transaction = new TransactionScope(mConfiguration)) { ChapterVersionDataStore dataStore = new ChapterVersionDataStore(transaction); dataStore.Update(chapterVers); transaction.Commit(); } }