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; }
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); }
public static GeoZone FromIGeoZone(IGeoZone igeo) { GeoZone state = new GeoZone { Id = igeo.Id, CountryId = igeo.CountryId, Code = igeo.Code, Name = igeo.Name }; return(state); }
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; }
/// <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; }
/// <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; }