public override void UpdateRegion(Region region)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var rDs = new RegionDataStore(transaction);
         rDs.Update(region);
         transaction.Commit();
     }
 }
        public override void DeleteRegion(Region region)
        {
            using (var transaction = new TransactionScope(_configuration))
            {
                var rDs = new RegionDataStore(transaction);
                region.Deleted = true;
                region.Name   += DateTimeHelper.GetCurrentTimestamp();

                DeleteSubRegion(region);

                rDs.Update(region);
                transaction.Commit();
            }
        }
 public void DeleteSubRegion(Region region)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var            rDs      = new RegionDataStore(transaction);
         IList <Region> children = rDs.FindAllBelow(region);
         foreach (Region child in children)
         {
             child.Deleted = true;
             child.Name   += DateTimeHelper.GetCurrentTimestamp();
             rDs.Update(child);
         }
         transaction.Commit();
     }
 }