public override IList <Region> GetAllRegionsByRegionType(RegionType regionType)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var rDs = new RegionDataStore(transaction);
         return(rDs.FindAllByRegionType(regionType));
     }
 }
 public override IList <RegionType> GetAllRegionTypesBelow(RegionType regionType)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var store = new RegionTypeDataStore(transaction);
         return(store.FindAllBelow(regionType));
     }
 }
Beispiel #3
0
        public static IList <Site> SearchSitesByRegionType(RegionType regionType)
        {
            if (regionType == null)
            {
                throw new ArgumentNullException("regionType");
            }

            return(Provider.GetSitesByRegionType(regionType));
        }
Beispiel #4
0
        public static IList <RegionType> GetAllRegionTypesBelow(RegionType regionType)
        {
            if (regionType == null)
            {
                throw new ArgumentNullException("regionType");
            }

            return(Provider.GetAllRegionTypesBelow(regionType));
        }
        public override bool RegionTypeExists(RegionType regionType)
        {
            using (var transaction = new TransactionScope(_configuration))
            {
                var        rtDs = new RegionTypeDataStore(transaction);
                RegionType rt   = rtDs.FindByName(regionType.Name);

                if (rt != null)
                {
                    return(true);
                }
            }
            return(false);
        }
        public override void CreateRegionType(RegionType regionType)
        {
            if (string.IsNullOrEmpty(regionType.Name))
            {
                throw new ProviderException("Region Type name cannot be empty or null.");
            }
            if (regionType.Name.IndexOf(',') > 0)
            {
                throw new ArgumentException("Region Type names cannot contain commas.");
            }

            using (var transaction = new TransactionScope(_configuration))
            {
                var rtDs = new RegionTypeDataStore(transaction);
                rtDs.Insert(regionType);
                transaction.Commit();
            }
        }
Beispiel #7
0
 public abstract bool RegionTypeExists(RegionType regionType);
Beispiel #8
0
 public abstract IList <Site> GetSitesByRegionType(RegionType regionType);
Beispiel #9
0
 public abstract IList <Region> GetAllRegionsByRegionType(RegionType regionType);
Beispiel #10
0
 public abstract IList <RegionType> GetAllRegionTypesBelow(RegionType regionType);
Beispiel #11
0
 public abstract void CreateRegionType(RegionType regionType);