An EntityQuery instance is used to query entities either from a remote datasource or from a local EntityManager.
EntityQueries are immutable - this means that all EntityQuery methods that return an EntityQuery actually create a new EntityQuery.
Therefore EntityQueries can be 'modified' without affecting any current instances.
Inheritance Hierarchy
Breeze.SharpEntityQuery
Breeze.SharpEntityQueryT
Namespace: Breeze.Sharp
Assembly: Breeze.Sharp (in Breeze.Sharp.dll) Version: 0.6.0.5 (0.6.0.5)
Syntax
public class EntityQuery<T> : EntityQuery, IOrderedQueryable<T>, IOrderedQueryable, IQueryable<T>, IEnumerable<T>, IQueryable, IEnumerable, IQueryProvider
Type Parameters
- T
The EntityQueryT type exposes the following members.
Constructors
Name | Description | |
---|---|---|
EntityQueryT |
Constructor
| |
EntityQueryT(String) |
Contructor for a query against a specific resource.
| |
EntityQueryT(EntityQueryT) |
May be called by subclasses that need to add additional behavior to a query.
The basic idea is to use this method to clone the query first and then add
or modify properties on the cloned instance.
| |
EntityQueryT(Expression, IQueryable) | Initializes a new instance of the EntityQueryT class |
Methods
Name | Description | |
---|---|---|
CheckEm | (Inherited from EntityQuery.) | |
Clone |
For internal use only.
(Overrides EntityQueryClone.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Execute(EntityManager) |
Executes this query, against an optionally specified EntityManager. If no EntityManager
is specified then the query is run on the EntityManager specified by the EntityManager
property on this instance. ( WithTQuery(TQuery, EntityManager) )
If this value is null an exception will be thrown.
| |
Execute(CancellationToken, EntityManager) |
Executes this query, against an optionally specified EntityManager. If no EntityManager
is specified then the query is run on the EntityManager specified by the EntityManager
property on this instance. ( WithTQuery(TQuery, EntityManager) )
If this value is null an exception will be thrown.
| |
ExecuteLocally |
Executes this query against the EntityManager's local cache, with an optionally specfied EntityManager.
If no EntityManager
is specified then the query is run on the EntityManager specified by the EntityManager
property on this instance. ( WithTQuery(TQuery, EntityManager) )
If this value is null an exception will be thrown.
| |
Expand(String) |
Returns a new query that will return related entities nested within its results.
The Expand method allows you to identify related entities, via navigation property names such
that a graph of entities may be retrieved with a single request. Any filtering occurs before
the results are 'expanded'.
| |
ExpandTTarget(ExpressionFuncT, TTarget) |
Returns a new query that will return related entities nested within its results.
The Expand method allows you to identify related entities, via navigation property names such
that a graph of entities may be retrieved with a single request. Any filtering occurs before
the results are 'expanded'.
| |
ExpandNonGeneric | (Overrides EntityQueryExpandNonGeneric(String).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
From |
Returns a new query with the specified resource name.
| |
GetEnumerator | ||
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetResourcePath |
For internal use.
(Overrides EntityQueryGetResourcePath(MetadataStore).) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InlineCount |
Returns a query with the 'inlineCount' capability either enabled or disabled. With
'InlineCount' enabled, an additional 'InlineCount' property will be returned with the
query results that will contain the number of entities that would have been returned by
this query with only the 'where'/'filter' clauses applied, i.e. without any 'skip'/'take'
operators applied. For local queries this clause is ignored.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UpdateFrom | (Inherited from EntityQuery.) | |
WithParameter |
Returns a new query that includes a specified parameter to pass to the server.
| |
WithParameters |
Returns a new query that includes a collection of parameters to pass to the server.
|
Extension Methods
Name | Description | |
---|---|---|
AllEqualT | Overloaded.
Returns true if all items in a cached collection are equal.
(Defined by EnumerableFns.) | |
AllEqualT, U(FuncT, U) | Overloaded.
Returns true if all items in a cached collection have the same projected value.
(Defined by EnumerableFns.) | |
DistinctT, TResult |
Returns distinct elements from a sequence by using a specified selector function to project objects to compare.
(Defined by EnumerableFns.) | |
ExceptT, TResult |
Produces the set difference of two sequences by using a specified selector function to compare values.
(Defined by EnumerableFns.) | |
ForEachT(ActionT) | Overloaded.
Enumerate a cached collection performing the specified action on each item.
(Defined by EnumerableFns.) | |
ForEachT(ActionT, Int32) | Overloaded.
Enumerate an indexed collection in cache performing the specified action on each item.
(Defined by EnumerableFns.) | |
GetAggregateHashCode |
Returns a hashcode for a collection that
uses a similar algorithm to that used by the .NET Tuple class.
Order matters.
(Defined by EnumerableFns.) | |
IndexOfT |
Returns the index of the first item in the sequence matching a condition, or -1 if no match found.
(Defined by EnumerableFns.) | |
IntersectT, TResult |
Produces the set intersection of two sequences by using a specified selector function to project objects to compare.
(Defined by EnumerableFns.) | |
OrderByTSource, TKey |
Sorts the elements of a sequence in ascending order.
(Defined by EntityQueryExtensions.) | |
OrderByDescendingTSource, TKey |
Sorts the elements of a sequence in descending order.
(Defined by EntityQueryExtensions.) | |
SelectTSource, TResult |
Projects each element of a sequence into a new form.
(Defined by EntityQueryExtensions.) | |
SkipTSource |
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
(Defined by EntityQueryExtensions.) | |
TakeTSource |
Returns a specified number of contiguous elements from the start of a sequence.
(Defined by EntityQueryExtensions.) | |
ThenByTSource, TKey | (Defined by EntityQueryExtensions.) | |
ThenByDescendingTSource, TKey | (Defined by EntityQueryExtensions.) | |
ToAggregateString |
Concatenates the string version of each element in a collection using the delimiter provided.
(Defined by EnumerableFns.) | |
ToHashSetT |
Returns a HashSetT of the specified collection.
(Defined by EnumerableFns.) | |
UnionT, TResult |
Produces the set union of two sequences by using a specified selector function to project objects to compare.
(Defined by EnumerableFns.) | |
WhereTSource(ExpressionFuncTSource, Int32, Boolean) | Overloaded.
Filters a sequence of values based on a predicate.
(Defined by EntityQueryExtensions.) | |
WhereTSource(ExpressionFuncTSource, Boolean) | Overloaded.
Filters a sequence of values based on a predicate.
(Defined by EntityQueryExtensions.) |
Properties
Name | Description | |
---|---|---|
DataService |
The DataService associated with this query.
(Inherited from EntityQuery.) | |
DataServiceQuery |
For internal use.
| |
ElementType |
The element type of the IEnumerable{T} returned by this query.
(Overrides EntityQueryElementType.) | |
EntityManager |
The EntityManager associated with this query.
(Inherited from EntityQuery.) | |
Expression | (Overrides EntityQueryExpression.) | |
JsonResultsAdapter | (Inherited from EntityQuery.) | |
Provider | ||
QueryableType |
The type being queried. This may not be the same as the type returned in the case
of a 'Select'.
(Inherited from EntityQuery.) | |
QueryOptions |
The QueryOptions associated with this query.
(Inherited from EntityQuery.) | |
ResourceName |
The resource name specified for this query.
(Inherited from EntityQuery.) |
See Also