Class NHQueryProvider
- Namespace
- Breeze.Persistence.NH
- Assembly
- Breeze.Persistence.NH.dll
An NHibernate query provider that also carries the Include paths for a query, since they cannot be put in the expression tree.
public class NHQueryProvider : DefaultQueryProvider, INhQueryProvider, IQueryProviderWithOptions, IQueryProvider, ISupportFutureBatchNhQueryProvider
- Inheritance
-
DefaultQueryProviderNHQueryProvider
- Implements
-
INhQueryProviderIQueryProviderWithOptionsISupportFutureBatchNhQueryProvider
- Inherited Members
-
DefaultQueryProvider.CreateWithOptions(NhQueryableOptions)DefaultQueryProvider.ExecuteQuery(NhLinqExpression, IQuery, NhLinqExpression)DefaultQueryProvider.ExecuteQuery(NhLinqExpression, IQuery)DefaultQueryProvider.CollectionDefaultQueryProvider.Session
Constructors
NHQueryProvider(ISessionImplementor)
Create a provider for a session.
public NHQueryProvider(ISessionImplementor session)
Parameters
sessionISessionImplementorThe session the query runs against.
NHQueryProvider(ISessionImplementor, object?)
Create a provider for a session, optionally querying within a collection.
public NHQueryProvider(ISessionImplementor session, object? collection)
Parameters
sessionISessionImplementorThe session the query runs against.
collectionobjectThe collection being queried, or null for a query over the whole type.
NHQueryProvider(DefaultQueryProvider)
Wrap an existing provider, taking over its session, collection and options.
public NHQueryProvider(DefaultQueryProvider source)
Parameters
sourceDefaultQueryProviderThe provider to wrap.
Remarks
The options live in a private field of DefaultQueryProvider and are copied by reflection. If a future NHibernate renames that field, this throws rather than silently dropping them.
Properties
Includes
The navigation paths to load after the query runs, added by Include<TEntity>(IQueryable<TEntity>, string).
public List<string> Includes { get; }
Property Value
Methods
WithOptions(Action<NhQueryableOptions>)
Apply query options and return a provider of this type, so the Include paths survive.
public IQueryProvider WithOptions(Action<NhQueryableOptions> setOptions)
Parameters
setOptionsAction<NhQueryableOptions>Sets the options - caching and the like.
Returns
- IQueryProvider
A new provider carrying the options.