DbSpatialDataReader.GetGeographyAsync Method (Int32, CancellationToken)

 

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

Namespace:   System.Data.Entity.Spatial
Assembly:  EntityFramework (in EntityFramework.dll)

[SuppressMessageAttribute("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", 
	Justification = "Exception provided in the returned task.")]
public virtual Task<DbGeography> GetGeographyAsync(
	int ordinal,
	CancellationToken cancellationToken
)

Parameters

ordinal
Type: System.Int32

The ordinal of the column that contains the geography value.

cancellationToken
Type: System.Threading.CancellationToken

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

Return Value

Type: System.Threading.Tasks.Task<DbGeography>

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

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