Class NextOrmQueryableExtensions
- Namespace
- NextORM.EntityFrameworkCore
- Assembly
- nextorm.entityframeworkcore.dll
Translates a bounded EF Core IQueryable<T> rooted at a DbSet<TEntity> into an equivalent nextorm EntityBuilder<TEntity>, so a query written with LINQ-to-Entities can be executed by nextorm on the same connection and transaction.
public static class NextOrmQueryableExtensions
- Inheritance
-
NextOrmQueryableExtensions
- Inherited Members
Remarks
Translation is deliberately bounded: only the operators nextorm can express without a client-side
fallback are accepted. Every other operator (projection, eager loading, grouping, joins, subqueries,
raw SQL and client evaluation) fails with NotSupportedException rather than being
silently evaluated in memory. IgnoreQueryFilters() and IgnoreQueryFilters(keys) are
translated into the nextorm query-local filter scope: the parameterless form disables every filter
(including anonymous ones), the named form disables only the listed keys (anonymous filters are
preserved).
Methods
ToNextOrm<T>(DbSet<T>)
Translates the DbSet<TEntity> itself into a nextorm EntityBuilder<TEntity> over the DbContext that owns it.
public static EntityBuilder<T> ToNextOrm<T>(this DbSet<T> source) where T : class
Parameters
sourceDbSet<T>The EF Core set to read through nextorm.
Returns
- EntityBuilder<T>
A nextorm builder reading every row of
source.
Type Parameters
TThe entity type at the root of the query.
Exceptions
- ArgumentNullException
sourceis null.- NotSupportedException
The owning DbContext cannot be resolved from
source.
ToNextOrm<T>(IQueryable<T>, DbContext)
Translates source into a nextorm EntityBuilder<TEntity> over
dbContext, replaying the supported operators it carries.
public static EntityBuilder<T> ToNextOrm<T>(this IQueryable<T> source, DbContext dbContext) where T : class
Parameters
sourceIQueryable<T>An EF Core query whose innermost expression is a DbSet<TEntity> of
T.dbContextDbContextThe EF Core context the query was composed from; the bridge borrows its connection and transaction.
Returns
- EntityBuilder<T>
A nextorm builder replaying the supported operators of
source.
Type Parameters
TThe entity type at the root of the query.
Exceptions
- ArgumentNullException
sourceordbContextis null.- NotSupportedException
The query is not rooted at a DbSet<TEntity> of
T, or it uses an operator or an expression nextorm cannot translate without a client-side fallback.