Table of Contents

Class DbDataReaderExtensions

Namespace
Songhay.Extensions
Assembly
SonghayCore.dll

Extensions of DbDataReader

public static class DbDataReaderExtensions
Inheritance
DbDataReaderExtensions
Inherited Members

Methods

GetFieldValueOrDefault<TRow>(DbDataReader, string)

Gets the field value or default.

public static TRow? GetFieldValueOrDefault<TRow>(this DbDataReader reader, string fieldName)

Parameters

reader DbDataReader

The reader.

fieldName string

Name of the field.

Returns

TRow

Type Parameters

TRow

Remarks

This member is a primitive alternative to using something like Dapper’s QueryAsync{TRow}, suitable for a handful of columns.