DbContext.Query<TQuery> Método

Definição

Cuidado

Use Set() for entity types without keys

Cria um DbSet<TEntity> que pode ser usado para consultar instâncias do 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

O tipo de consulta para o qual um DbQuery deve ser retornado.

Retornos

Um DbQuery para o tipo de entidade sem chave fornecido.

Atributos

Aplica-se a