EntityTypeBuilder<TEntity>.ToQuery Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use InMemoryEntityTypeBuilderExtensions.ToInMemoryQuery
Configures a query used to provide data for a keyless entity type.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> ToQuery (System.Linq.Expressions.Expression<Func<System.Linq.IQueryable<TEntity>>> query);
[System.Obsolete("Use InMemoryEntityTypeBuilderExtensions.ToInMemoryQuery")]
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> ToQuery (System.Linq.Expressions.Expression<Func<System.Linq.IQueryable<TEntity>>> query);
abstract member ToQuery : System.Linq.Expressions.Expression<Func<System.Linq.IQueryable<'Entity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
override this.ToQuery : System.Linq.Expressions.Expression<Func<System.Linq.IQueryable<'Entity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
[<System.Obsolete("Use InMemoryEntityTypeBuilderExtensions.ToInMemoryQuery")>]
abstract member ToQuery : System.Linq.Expressions.Expression<Func<System.Linq.IQueryable<'Entity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
override this.ToQuery : System.Linq.Expressions.Expression<Func<System.Linq.IQueryable<'Entity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
Public Overridable Function ToQuery (query As Expression(Of Func(Of IQueryable(Of TEntity)))) As EntityTypeBuilder(Of TEntity)
Parameters
- query
- Expression<Func<IQueryable<TEntity>>>
The query that will provide the underlying data for the keyless entity type.
Returns
The same builder instance so that multiple calls can be chained.
- Attributes
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework