internal class DataReader bug?

Nov 15, 2012 at 3:05 AM

 public string GetString(string name)
            return _innerReader.GetString(GetOrdinal(name));

if value is DbNull for error


  public virtual string GetString(int i)
            if (_dataReader.IsDBNull(i))
                return string.Empty;
                return _dataReader.GetString(i);
GetInt32 GetDouble all bug

Nov 26, 2012 at 12:31 AM

Thank you. This is partly fixed in the latest check in, DBNull has been replaced by the default value of the returning type, in this case that is null and not string.empty (I will consider creating an setting for this where you can choose between string.empty or null). However the latest source code includes some API changes/simplifications so I need to wait a few days until I make a new release in order to update the documentation. I will notify you when the release is out.