using System.Data.Common;
namespace Marr.Data
{
///
/// This class contains public extension methods.
///
public static class ExtensionMethods
{
///
/// Gets a value from a DbDataReader by using the column name;
///
public static T GetValue(this DbDataReader reader, string columnName)
{
int ordinal = reader.GetOrdinal(columnName);
return (T)reader.GetValue(ordinal);
}
}
}