コード例 #1
0
        public CustomerDemographicCollection FetchByQuery(Query qry)
        {
            CustomerDemographicCollection coll = new CustomerDemographicCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
コード例 #2
0
        public CustomerDemographicCollection FetchAll()
        {
            CustomerDemographicCollection coll = new CustomerDemographicCollection();
            Query qry = new Query(CustomerDemographic.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
コード例 #3
0
        public static Northwind.CustomerDemographicCollection GetCustomerDemographicCollection(string varCustomerID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[CustomerDemographics] INNER JOIN [CustomerCustomerDemo] ON [CustomerDemographics].[CustomerTypeID] = [CustomerCustomerDemo].[CustomerTypeID] WHERE [CustomerCustomerDemo].[CustomerID] = @CustomerID", Customer.Schema.Provider.Name);
            cmd.AddParameter("@CustomerID", varCustomerID, DbType.String);
            IDataReader rdr = SubSonic.DataService.GetReader(cmd);
            CustomerDemographicCollection coll = new CustomerDemographicCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }