Class QueryStrategy
A specification for a query to execute.
Inheritance
System.Object
QueryStrategy
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Cqrs.dll
Syntax
public abstract class QueryStrategy : IQueryStrategy
Properties
QueryPredicate
The predicate that will be evaluated.
Declaration
public IQueryPredicate QueryPredicate { get; protected set; }
Property Value
Implements
Methods
And(IQueryPredicate)
Declaration
protected virtual IQueryPredicate And(IQueryPredicate queryPredicate)
Parameters
Returns
BuildQueryPredicate<TData>(Func<TData>)
Declaration
protected virtual IQueryPredicate BuildQueryPredicate<TData>(Func<TData> func)
Parameters
Type |
Name |
Description |
System.Func<TData> |
func |
|
Returns
Type Parameters
BuildQueryPredicate<TParameter1, TData>(Func<TParameter1, TData>, TParameter1)
Builds a IQueryPredicate from the provided func
storing the provided parameter1
.
Declaration
protected virtual IQueryPredicate BuildQueryPredicate<TParameter1, TData>(Func<TParameter1, TData> func, TParameter1 parameter1)
Parameters
Type |
Name |
Description |
System.Func<TParameter1, TData> |
func |
|
TParameter1 |
parameter1 |
|
Returns
Type Parameters
Name |
Description |
TParameter1 |
|
TData |
|
BuildQueryPredicate<TParameter1, TParameter2, TData>(Func<TParameter1, TParameter2, TData>, TParameter1, TParameter2)
Builds a IQueryPredicate from the provided func
storing the provided parameter1
and parameter2
.
Declaration
protected virtual IQueryPredicate BuildQueryPredicate<TParameter1, TParameter2, TData>(Func<TParameter1, TParameter2, TData> func, TParameter1 parameter1, TParameter2 parameter2)
Parameters
Type |
Name |
Description |
System.Func<TParameter1, TParameter2, TData> |
func |
|
TParameter1 |
parameter1 |
|
TParameter2 |
parameter2 |
|
Returns
Type Parameters
Name |
Description |
TParameter1 |
|
TParameter2 |
|
TData |
|
IsNotLogicallyDeleted()
Filter to all items not logically deleted.
Declaration
public virtual IQueryPredicate IsNotLogicallyDeleted()
Returns
Or(IQueryPredicate)
Declaration
protected virtual IQueryPredicate Or(IQueryPredicate queryPredicate)
Parameters
Returns
WithPermissionScopeAny<TAuthenticationToken>(TAuthenticationToken)
Filter to all items with any permission scope.
Declaration
public virtual IQueryPredicate WithPermissionScopeAny<TAuthenticationToken>(TAuthenticationToken authenticationToken)
Parameters
Type |
Name |
Description |
TAuthenticationToken |
authenticationToken |
|
Returns
Type Parameters
Name |
Description |
TAuthenticationToken |
|
WithPermissionScopeCompany<TAuthenticationToken>(TAuthenticationToken)
Filter to any items the company the authenticated user can view.
Declaration
public virtual IQueryPredicate WithPermissionScopeCompany<TAuthenticationToken>(TAuthenticationToken authenticationToken)
Parameters
Type |
Name |
Description |
TAuthenticationToken |
authenticationToken |
|
Returns
Type Parameters
Name |
Description |
TAuthenticationToken |
|
WithPermissionScopeCompanyAndUser<TAuthenticationToken>(TAuthenticationToken)
Filter to any items the company the authenticated user can view and then filter the results to any items the authenticated user can see.
Declaration
public virtual IQueryPredicate WithPermissionScopeCompanyAndUser<TAuthenticationToken>(TAuthenticationToken authenticationToken)
Parameters
Type |
Name |
Description |
TAuthenticationToken |
authenticationToken |
|
Returns
Type Parameters
Name |
Description |
TAuthenticationToken |
|
WithPermissionScopeUser<TAuthenticationToken>(TAuthenticationToken)
Filter to any items the authenticated user can view.
Declaration
public virtual IQueryPredicate WithPermissionScopeUser<TAuthenticationToken>(TAuthenticationToken authenticationToken)
Parameters
Type |
Name |
Description |
TAuthenticationToken |
authenticationToken |
|
Returns
Type Parameters
Name |
Description |
TAuthenticationToken |
|