What about this?
ld.Percentage = reader["DataWin3Data"] == DBNull.Value
? double.MinValue : (double)reader["DataWin3Data"];
I've used code like this many times without issue. Are you sure that you're always reading the same field that you're also checking for null?
Also, don't use Convert
when you're not actually converting. This should be a cast (like in my example).
If that doesn't work, it might be that you're doing something weird with the data. Perhaps some serialization on the way? Try this:
ld.Percentage = reader["DataWin3Data"] is DBNull
? double.MinValue : (double)reader["DataWin3Data"];