src/Shared/EntityFramework/Spatial/DbSpatialDataReader.cs
/// <summary>
/// Asynchronously reads an instance of <see cref="DbGeography" /> from the column at the specified column ordinal.
/// </summary>
/// <remarks>
/// Providers should override with an appropriate implementation.
/// The default implementation invokes the synchronous <see cref="GetGeography" /> method and returns
/// a completed task, blocking the calling thread.
/// </remarks>
/// <param name="ordinal"> The ordinal of the column that contains the geography value. </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken" /> to observe while waiting for the task to complete.
/// </param>
/// <returns>
/// A task that represents the asynchronous operation.
/// The task result contains the instance of <see cref="DbGeography" /> at the specified column value.
/// </returns>
Asynchronously reads an instance of  from the column at the specified column ordinal.
Asynchronously reads an instance of from the column at the specified column ordinal .
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes",
            Justification = "Exception provided in the returned task.")]
        public virtual Task<DbGeography> GetGeographyAsync(int ordinal, CancellationToken cancellationToken)
        {
            if (cancellationToken.IsCancellationRequested)
            {
                return TaskHelper.FromCancellation<DbGeography>();
            }
            try
            {
                return Task.FromResult(GetGeography(ordinal));
            }
            catch (Exception e)
            {
                return TaskHelper.FromException<DbGeography>(e);
            }
        }
[ SuppressMessage ( " " , " " , Justification = " " ) ] public virtual Task < DbGeography > GetGeographyAsync ( int ordinal , CancellationToken cancellationToken ) { if ( cancellationToken . IsCancellationRequested ) { return TaskHelper . FromCancellation < DbGeography > ( ) ; } try { return Task . FromResult ( GetGeography ( ordinal ) ) ; } catch ( Exception e ) { return TaskHelper . FromException < DbGeography > ( e ) ; } }
Asynchronously reads an instance of  from the column at the specified column ordinal.
Asynchronously reads an instance of from the column at the specified column ordinal .
A task that represents the asynchronous operation.
The task result contains the instance of  at the specified column value.
A task that represents the asynchronous operation . The task result contains the instance of at the specified column value .
ordinal
int
The ordinal of the column that contains the geography value.
The ordinal of the column that contains the geography value .
cancellationToken
CancellationToken
A  to observe while waiting for the task to complete.
A to observe while waiting for the task to complete .
remarks
Providers should override with an appropriate implementation.
The default implementation invokes the synchronous  method and returns
a completed task, blocking the calling thread.
Providers should override with an appropriate implementation . The default implementation invokes the synchronous method and returns a completed task blocking the calling thread .