public StoreCollection FetchByQuery(Query qry) { StoreCollection coll = new StoreCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public StoreCollection FetchAll() { StoreCollection coll = new StoreCollection(); Query qry = new Query(Store.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public static AVManager.DAL.StoreCollection GetStoreCollection(int varContactTypeID) { SubSonic.QueryCommand cmd = new SubSonic.QueryCommand( "SELECT * FROM Store INNER JOIN StoreContact ON " + "Store.CustomerID=StoreContact.CustomerID WHERE StoreContact.ContactTypeID=@ContactTypeID", ContactType.Schema.Provider.Name); cmd.AddParameter("@ContactTypeID", varContactTypeID, DbType.Int32); IDataReader rdr = SubSonic.DataService.GetReader(cmd); StoreCollection coll = new StoreCollection(); coll.LoadAndCloseReader(rdr); return(coll); }