public CountryRegionCollection FetchByQuery(Query qry) { CountryRegionCollection coll = new CountryRegionCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public CountryRegionCollection FetchAll() { CountryRegionCollection coll = new CountryRegionCollection(); Query qry = new Query(CountryRegion.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public static AVManager.DAL.CountryRegionCollection GetCountryRegionCollection(string varCurrencyCode) { SubSonic.QueryCommand cmd = new SubSonic.QueryCommand( "SELECT * FROM CountryRegion INNER JOIN CountryRegionCurrency ON " + "CountryRegion.CountryRegionCode=CountryRegionCurrency.CountryRegionCode WHERE CountryRegionCurrency.CurrencyCode=@CurrencyCode", Currency.Schema.Provider.Name); cmd.AddParameter("@CurrencyCode", varCurrencyCode, DbType.String); IDataReader rdr = SubSonic.DataService.GetReader(cmd); CountryRegionCollection coll = new CountryRegionCollection(); coll.LoadAndCloseReader(rdr); return(coll); }