Jazyk

SqlServerQueryableExtensions.ContainsTable<T,TKey> Metoda

Definice

Dotazuje fulltextový index pomocí funkce SQL ServerCONTAINSTABLE.

public static System.Linq.IQueryable<Microsoft.EntityFrameworkCore.Query.FullTextSearchResult<TKey>> ContainsTable<T,TKey>(this Microsoft.EntityFrameworkCore.DbSet<T> source, string searchCondition, System.Linq.Expressions.Expression<Func<T,object>>? columnSelector = default, string? languageTerm = default, int? topN = default) where T : class;
static member ContainsTable : Microsoft.EntityFrameworkCore.DbSet<'T (requires 'T : null)> * string * System.Linq.Expressions.Expression<Func<'T, obj>> * string * Nullable<int> -> System.Linq.IQueryable<Microsoft.EntityFrameworkCore.Query.FullTextSearchResult<'Key>> (requires 'T : null)
<Extension()>
Public Function ContainsTable(Of T As Class, TKey As Class) (source As DbSet(Of T), searchCondition As String, Optional columnSelector As Expression(Of Func(Of T, Object)) = Nothing, Optional languageTerm As String = Nothing, Optional topN As Nullable(Of Integer) = Nothing) As IQueryable(Of FullTextSearchResult(Of TKey))

Parametry typu

T

Dotazovaný typ entity.

TKey

Typ sloupce s fulltextovým klíčem.

Parametry

source
DbSet<T>

Představuje DbSet<TEntity> tabulku s fulltextovým indexem.

searchCondition
String

Podmínka hledání podporující predikáty fulltextu, jako je AND, OR, NEARatd.

columnSelector
Expression<Func<T,Object>>

Volitelný selektor pro vyhledávání sloupců. Může to být jedna vlastnost (např e => e.Title. ) nebo více vlastností prostřednictvím anonymního typu (např e => new { e.Title, e.Body }. ). Pokud tento argument vynecháte, prohledávají se všechny fulltextové indexované sloupce.

languageTerm
String

Nepovinný jazykový termín pro sys.syslanguages dělení slov.

topN
Nullable<Int32>

Volitelný maximální počet výsledků, které se mají vrátit.

Návraty

FullTextSearchResult<TKey> Hodnota IQueryable<T> obsahující klíč a pořadí odpovídajících řádků

Poznámky

Key Pomocí vlastnosti se můžete připojit zpět k původní tabulce a načíst úplná data entity.

Další informace najdete v SQL Server dokumentaciCONTAINSTABLE.

Platí pro