A Sandcastle Documented Class Library

# IMultiTenancyService TenantQuery Method

Gets the tenants corresponding to query criteria.

Namespace: Dundas.BI.AccountServices.MultiTenancy
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    IList<Tenant> TenantQuery(
    	int pageNumber,
    	int pageSize,
    	IList<Tuple<TenantQueryField, SortDirection>> orderBy,
    	ICollection<TenantQueryFilterRule> filter
    )

    Function TenantQuery (
    	pageNumber As Integer,
    	pageSize As Integer,
    	orderBy As IList(Of Tuple(Of TenantQueryField, SortDirection)),
    	filter As ICollection(Of TenantQueryFilterRule)
    ) As IList(Of Tenant)

    IList<Tenant^>^ TenantQuery(
    	int pageNumber,
    	int pageSize,
    	IList<Tuple<TenantQueryField, SortDirection>^>^ orderBy,
    	ICollection<TenantQueryFilterRule^>^ filter
    )

    abstract TenantQuery :
            pageNumber : int *
            pageSize : int *
            orderBy : IList<Tuple<TenantQueryField, SortDirection>> *
            filter : ICollection<TenantQueryFilterRule> -> IList<Tenant>

#### Parameters

pageNumber
  Type: System
  Int32
  The page number, or 0 to indicate that all pages should be returned.
pageSize
  Type: System
  Int32
  The number of results in each page (ignored if pageNumber is 0).
orderBy
  Type: System.Collections.Generic
  IList
  Tuple
  TenantQueryField, SortDirection
  The sort order of the result, or
  if the order does not matter.
filter
  Type: System.Collections.Generic
  ICollection
  TenantQueryFilterRule
  The filter rules which should be applied to the query, or
  if no filters are required.

#### Return Value

Type: IList
Tenant
The collection of Tenant objects matching the query criteria.
Exceptions

Exception | Condition
--- | ---
ArgumentOutOfRangeException | pageNumber is less than zero. -or- pageSize is less or equal to than zero.
InvalidOperationException | filter contains an invalid rule.
FeatureNotEnabledException | The multi-tenancy features of the application are not enabled.
NoPrivilegeException | The caller does not have system administration privileges.
InvalidSessionException | The caller context is not associated with a valid session.

Remarks
Specifying
or Empty for filter disables any filtering.
See Also

#### Reference

IMultiTenancyService Interface
Dundas.BI.AccountServices.MultiTenancy Namespace