Inheritance: IGeoZone
Esempio n. 1
0
        public static GeoZone FromIGeoZone(IGeoZone igeo)
        {
            GeoZone state = new GeoZone();
            state.Guid = igeo.Guid;
            state.CountryGuid = igeo.CountryGuid;
            state.Code = igeo.Code;
            state.Name = igeo.Name;

            return state;
        }
Esempio n. 2
0
        public static GeoZone FromIGeoZone(IGeoZone igeo)
        {
            GeoZone state = new GeoZone();

            state.Guid        = igeo.Guid;
            state.CountryGuid = igeo.CountryGuid;
            state.Code        = igeo.Code;
            state.Name        = igeo.Name;

            return(state);
        }
Esempio n. 3
0
        public static GeoZone FromIGeoZone(IGeoZone igeo)
        {
            GeoZone state = new GeoZone
            {
                Id        = igeo.Id,
                CountryId = igeo.CountryId,
                Code      = igeo.Code,
                Name      = igeo.Name
            };

            return(state);
        }
Esempio n. 4
0
        private List<IGeoZone> LoadGeoZoneListFromReader(DbDataReader reader)
        {
            List<IGeoZone> geoZoneList = new List<IGeoZone>();

            using(reader)
            {
                while (reader.Read())
                {
                    GeoZone geoZone = new GeoZone();
                    LoadFromReader(reader, geoZone);
                    geoZoneList.Add(geoZone);

                }
            }
            
            return geoZoneList;

        }
Esempio n. 5
0
        /// <param name="guid"> guid </param>
        public async Task<IGeoZone> FetchGeoZone(Guid guid)
        {
            using (DbDataReader reader = await dbGeoZone.GetOne(guid))
            {
                if (reader.Read())
                {
                    GeoZone geoZone = new GeoZone();
                    geoZone.Guid = new Guid(reader["Guid"].ToString());
                    geoZone.CountryGuid = new Guid(reader["CountryGuid"].ToString());
                    geoZone.Name = reader["Name"].ToString();
                    geoZone.Code = reader["Code"].ToString();

                    return geoZone;

                }
            }

            return null;
        }
Esempio n. 6
0
        /// <param name="guid"> guid </param>
        public async Task<IGeoZone> FetchGeoZone(
            Guid guid, 
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();

            using (DbDataReader reader = dbGeoZone.GetOne(guid))
            {
                if (reader.Read())
                {
                    GeoZone geoZone = new GeoZone();
                    geoZone.Guid = new Guid(reader["Guid"].ToString());
                    geoZone.CountryGuid = new Guid(reader["CountryGuid"].ToString());
                    geoZone.Name = reader["Name"].ToString();
                    geoZone.Code = reader["Code"].ToString();

                    return geoZone;

                }
            }

            return null;
        }