SqlServerQueryableExtensions.ContainsTable<T,TKey> Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Esegue una query su un indice full-text usando la funzione 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))
Parametri di tipo
- T
Tipo di entità sottoposto a query.
- TKey
Tipo della colonna chiave full-text.
Parametri
- source
- DbSet<T>
Oggetto DbSet<TEntity> che rappresenta la tabella con l'indice full-text.
- searchCondition
- String
Condizione di ricerca, che supporta predicati full-text come AND, OR, NEARe così via.
- columnSelector
- Expression<Func<T,Object>>
Selettore facoltativo per le colonne in cui eseguire la ricerca. Può essere una singola proprietà ,ad esempio e => e.Title, o più proprietà tramite un tipo anonimo ,ad esempio e => new { e.Title, e.Body }.
Se omesso, vengono eseguite ricerche in tutte le colonne indicizzate full-text.
- languageTerm
- String
Termine linguistico facoltativo da sys.syslanguages per il word breaking.
Valori restituiti
Oggetto IQueryable<T> contenente FullTextSearchResult<TKey> la chiave e il rango delle righe corrispondenti.
Commenti
Utilizzare la Key proprietà per eseguire il join alla tabella originale per recuperare i dati completi dell'entità.
Per altre informazioni , vedere SQL Server documentazioneCONTAINSTABLE.