public UserCollection FetchByQuery(Query qry) { UserCollection coll = new UserCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public UserCollection FetchAll() { UserCollection coll = new UserCollection(); Query qry = new Query(User.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public static PMT.DAL.UserCollection GetUserCollection(int varId) { SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Users] INNER JOIN [ProjectAssignments] ON [Users].[ID] = [ProjectAssignments].[UserID] WHERE [ProjectAssignments].[ProjectID] = @ProjectID", Project.Schema.Provider.Name); cmd.AddParameter("@ProjectID", varId, DbType.Int32); IDataReader rdr = SubSonic.DataService.GetReader(cmd); UserCollection coll = new UserCollection(); coll.LoadAndCloseReader(rdr); return(coll); }