Share via


DbSpatialDataReader.GetGeographyAsync(Int32, CancellationToken) Method

Definition

Asynchronously reads an instance of DbGeography from the column at the specified column ordinal.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification="Exception provided in the returned task.")]
public virtual System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeography> GetGeographyAsync (int ordinal, System.Threading.CancellationToken cancellationToken);
abstract member GetGeographyAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeography>
override this.GetGeographyAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeography>

Parameters

ordinal
Int32

The ordinal of the column that contains the geography value.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation. The task result contains the instance of DbGeography at the specified column value.

Attributes

Remarks

Providers should override with an appropriate implementation. The default implementation invokes the synchronous GetGeography(Int32) method and returns a completed task, blocking the calling thread.

Applies to