public ContactCollection FetchByQuery(Query qry) { ContactCollection coll = new ContactCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public ContactCollection FetchAll() { ContactCollection coll = new ContactCollection(); Query qry = new Query(Contact.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public static AVManager.DAL.ContactCollection GetContactCollection(int varVendorID) { SubSonic.QueryCommand cmd = new SubSonic.QueryCommand( "SELECT * FROM Contact INNER JOIN VendorContact ON " + "Contact.ContactID=VendorContact.ContactID WHERE VendorContact.VendorID=@VendorID", Vendor.Schema.Provider.Name); cmd.AddParameter("@VendorID", varVendorID, DbType.Int32); IDataReader rdr = SubSonic.DataService.GetReader(cmd); ContactCollection coll = new ContactCollection(); coll.LoadAndCloseReader(rdr); return(coll); }