public override IList <Approver> GetApproversByItem(string itemId) { using (var transaction = new TransactionScope(_configuration)) { var store = new ApproverDataStore(transaction); return(store.FindAllByItem(itemId)); } }
public override void CreateApprover(Approver approver) { using (var transaction = new TransactionScope(_configuration)) { var store = new ApproverDataStore(transaction); store.Insert(approver); transaction.Commit(); } }
public override void DeleteApproversByItem(string itemId) { using (var transaction = new TransactionScope(_configuration)) { var store = new ApproverDataStore(transaction); IList <Approver> approvers = store.FindAllByItem(itemId); if (approvers != null) { foreach (Approver approver in approvers) { approver.Deleted = true; store.Update(approver); transaction.Commit(); } } } }