Table of Contents

Method EnsureReaderType

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

EnsureReaderType<TActual>(TActual)

Casts a reader to the expected reader type.

protected static TReader EnsureReaderType<TActual>(TActual reader) where TActual : IDataReader

Parameters

reader TActual

The reader to cast.

Returns

TReader

The reader as a TReader.

Type Parameters

TActual

The actual type of the reader.

Exceptions

InvalidCastException

The reader is not a TReader.