Exemplo n.º 1
0
        public CategoryCollection FetchByQuery(Query qry)
        {
            CategoryCollection coll = new CategoryCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Exemplo n.º 2
0
        public CategoryCollection FetchAll()
        {
            CategoryCollection coll = new CategoryCollection();
            Query qry = new Query(Category.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Exemplo n.º 3
0
        public static Northwind.CategoryCollection GetCategoryCollection(int varProductID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Categories] INNER JOIN [Product_Category_Map] ON [Categories].[CategoryID] = [Product_Category_Map].[CategoryID] WHERE [Product_Category_Map].[ProductID] = @ProductID", Product.Schema.Provider.Name);
            cmd.AddParameter("@ProductID", varProductID, DbType.Int32);
            IDataReader        rdr  = SubSonic.DataService.GetReader(cmd);
            CategoryCollection coll = new CategoryCollection();

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