Compartir a través de


DbContext.Query<TQuery> Método

Definición

Precaución

Use Set() for entity types without keys

Crea un DbSet<TEntity> objeto que se puede usar para consultar instancias de TQuery.

public virtual Microsoft.EntityFrameworkCore.DbQuery<TQuery> Query<TQuery> () where TQuery : class;
[System.Obsolete("Use Set() for entity types without keys")]
public virtual Microsoft.EntityFrameworkCore.DbQuery<TQuery> Query<TQuery> () where TQuery : class;
abstract member Query : unit -> Microsoft.EntityFrameworkCore.DbQuery<'Query (requires 'Query : null)> (requires 'Query : null)
override this.Query : unit -> Microsoft.EntityFrameworkCore.DbQuery<'Query (requires 'Query : null)> (requires 'Query : null)
[<System.Obsolete("Use Set() for entity types without keys")>]
abstract member Query : unit -> Microsoft.EntityFrameworkCore.DbQuery<'Query (requires 'Query : null)> (requires 'Query : null)
override this.Query : unit -> Microsoft.EntityFrameworkCore.DbQuery<'Query (requires 'Query : null)> (requires 'Query : null)
Public Overridable Function Query(Of TQuery As Class) () As DbQuery(Of TQuery)

Parámetros de tipo

TQuery

Tipo de consulta para la que se debe devolver una dbQuery.

Devoluciones

DbQuery para el tipo de entidad sin clave especificado.

Atributos

Se aplica a