The EntitySpaces 2008 API Reference (Full)
QueryReset Method
EntitySpaces.CoreBusinessObjectsEmployeesCollectionQueryReset()()()
Persistence Layer and Business Objects for Microsoft .NET
Useful for building up conditional queries. In most cases, before loading an entity or collection, you should instantiate a new one. This method was added to handle specialized circumstances, and should not be used as a substitute for that.
Declaration Syntax
C#Visual Basic
public void QueryReset()
Public Sub QueryReset
Remarks
This just sets obj.Query to null/Nothing. In most cases, you will 'new' your object before loading it, rather than calling this method. It only affects obj.Query.Load(), so is not useful when Joins are involved, or for many other situations. Because it clears out any obj.Query.Where clauses, it can be useful for building conditional queries on the fly.
CopyC#
public bool ReQuery(string lastName, string firstName)
{
    this.QueryReset();

    if(!String.IsNullOrEmpty(lastName))
    {
        this.Query.Where(
            this.Query.LastName == lastName);
    }
    if(!String.IsNullOrEmpty(firstName))
    {
        this.Query.Where(
            this.Query.FirstName == firstName);
    }

    return this.Query.Load();
}
CopyVB.NET
Public Function ReQuery(ByVal lastName As String, _
    ByVal firstName As String) As Boolean

    Me.QueryReset()

    If Not [String].IsNullOrEmpty(lastName) Then
        Me.Query.Where(Me.Query.LastName = lastName)
    End If
    If Not [String].IsNullOrEmpty(firstName) Then
        Me.Query.Where(Me.Query.FirstName = firstName)
    End If

    Return Me.Query.Load()
End Function

Assembly: BusinessObjects (Module: BusinessObjects) Version: 2008.1.811.0 (2008.1.0811.0)