Metodo DbRawSqlQuery<TElement>.MaxAsync (CancellationToken)
[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]
Restituisce in modo asincrono il valore massimo della query.
Spazio dei nomi: System.Data.Entity.Infrastructure
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
Public Function MaxAsync ( _
cancellationToken As CancellationToken _
) As Task(Of TElement)
'Utilizzo
Dim instance As DbRawSqlQuery
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of TElement)
returnValue = instance.MaxAsync(cancellationToken)
public Task<TElement> MaxAsync(
CancellationToken cancellationToken
)
public:
Task<TElement>^ MaxAsync(
CancellationToken cancellationToken
)
member MaxAsync :
cancellationToken:CancellationToken -> Task<'TElement>
public function MaxAsync(
cancellationToken : CancellationToken
) : Task<TElement>
Parametri
- cancellationToken
Tipo: System.Threading.CancellationToken
Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.
Valore restituito
Tipo: System.Threading.Tasks.Task<TElement>
Attività che rappresenta l'operazione asincrona.Il risultato dell'attività contiene il valore massimo nel risultato della query.
Note
Non è consentito eseguire più operazioni attive nella stessa istanza di contesto. Utilizzare 'await' per assicurarsi che eventuali operazioni asincrone vengano completate prima di chiamare un altro metodo su questo contesto.