public Geolocation LoadData(System.Data.SqlClient.SqlDataReader reader, Geolocation data) { try { if (data == null) { data = new Geolocation(); } data.IpMin = reader.GetField <long>(IpMin); data.IpMax = reader.GetField <long>(IpMax); /*data.CountryCode = reader.GetField<string>(CountryCode); * data.CountryName = reader.GetField<string>(CountryName); * data.State = reader.GetField<string>(State); * data.City = reader.GetField<string>(City);*/ data.Latitude = reader.GetField <float>(Latitude); data.Longitude = reader.GetField <float>(Longitude); /*data.ZipCode = reader.GetField<string>(ZipCode); * data.TimeZone = reader.GetField<string>(TimeZone);*/ return(data); } catch { data.Latitude = -1; return(data); } }
public User LoadData(System.Data.SqlClient.SqlDataReader reader, User data) { if (data == null) { data = new User(); } data.Id = reader.GetField <Guid>("Id"); data.UserName = reader.GetField <string>(UserName); data.Email = reader.GetField <string>(Email); data.ProviderId = reader.GetField <int>(ProviderId); data.ProviderUserId = reader.GetField <string>(ProviderUserId); data.Role = reader.GetField <string>(Role); data.Password = reader.GetField <string>(Password); return(data); }