public static List <GeoCountry> GetPage( int pageNumber, int pageSize, out int totalPages) { List <GeoCountry> geoCountryCollection = new List <GeoCountry>(); using (IDataReader reader = DBGeoCountry.GetPage(pageNumber, pageSize, out totalPages)) { while (reader.Read()) { GeoCountry geoCountry = new GeoCountry(); geoCountry.guid = new Guid(reader["Guid"].ToString()); geoCountry.name = reader["Name"].ToString(); geoCountry.iSOCode2 = reader["ISOCode2"].ToString(); geoCountry.iSOCode3 = reader["ISOCode3"].ToString(); geoCountryCollection.Add(geoCountry); //totalPages = Convert.ToInt32(reader["TotalPages"]); } } return(geoCountryCollection); }
public static int CompareByIsoCode3(GeoCountry country1, GeoCountry country2) { return(country1.IsoCode3.CompareTo(country2.IsoCode3)); }
public static int CompareByName(GeoCountry country1, GeoCountry country2) { return(country1.Name.CompareTo(country2.Name)); }