internal class DataReader bug?

Nov 15, 2012 at 2: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 25, 2012 at 11:31 PM

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.