Share via


Database.CompileQuery Method

Definition

Overloads

CompileQuery<TResult>(QueryModel)

Translates a query model into a function that can be executed to get query results from the database.

CompileQuery<TResult>(Expression, Boolean)

Compiles the given query to generate a Func<T,TResult>.

CompileQuery<TResult>(QueryModel)

Source:
Database.cs
Source:
Database.cs

Translates a query model into a function that can be executed to get query results from the database.

public virtual Func<Microsoft.EntityFrameworkCore.Query.QueryContext,System.Collections.Generic.IEnumerable<TResult>> CompileQuery<TResult> (Remotion.Linq.QueryModel queryModel);
abstract member CompileQuery : Remotion.Linq.QueryModel -> Func<Microsoft.EntityFrameworkCore.Query.QueryContext, seq<'Result>>
override this.CompileQuery : Remotion.Linq.QueryModel -> Func<Microsoft.EntityFrameworkCore.Query.QueryContext, seq<'Result>>
Public Overridable Function CompileQuery(Of TResult) (queryModel As QueryModel) As Func(Of QueryContext, IEnumerable(Of TResult))

Type Parameters

TResult

The type of results returned by the query.

Parameters

queryModel
Remotion.Linq.QueryModel

An object model representing the query to be executed.

Returns

A function that will execute the query.

Implements

Applies to

CompileQuery<TResult>(Expression, Boolean)

Source:
Database.cs
Source:
Database.cs
Source:
Database.cs
Source:
Database.cs
Source:
Database.cs
Source:
Database.cs
Source:
Database.cs

Compiles the given query to generate a Func<T,TResult>.

public virtual Func<Microsoft.EntityFrameworkCore.Query.QueryContext,TResult> CompileQuery<TResult> (System.Linq.Expressions.Expression query, bool async);
abstract member CompileQuery : System.Linq.Expressions.Expression * bool -> Func<Microsoft.EntityFrameworkCore.Query.QueryContext, 'Result>
override this.CompileQuery : System.Linq.Expressions.Expression * bool -> Func<Microsoft.EntityFrameworkCore.Query.QueryContext, 'Result>
Public Overridable Function CompileQuery(Of TResult) (query As Expression, async As Boolean) As Func(Of QueryContext, TResult)

Type Parameters

TResult

The type of query result.

Parameters

query
Expression

The query to compile.

async
Boolean

A value indicating whether this is an async query.

Returns

Func<QueryContext,TResult>

A Func<T,TResult> which can be invoked to get results of the query.

Implements

Applies to