Double.NaN is stored and retrieved as null (EF6 Code First)
Posted: Tue 18 Sep 2018 09:31
Hello.
Assume we have the following entity:
User with Age=Double.NaN is stored to database and retrieved from it as null (column type is real, null is allowed).
User with Age=null is also stored to database and retrieved from it as null (that works as I expect).
Double.PositiveInfinity and Double.NegativeInfinity are also saved and retrieved correctly.
So why Double.NaN is not working?
I use dotConnect for SQLite 5.11.1202.
Assume we have the following entity:
Code: Select all
public class User
{
public Guid Id { get; set; }
public String Name { get; set; }
public Double? Age { get; set; }
}
User with Age=null is also stored to database and retrieved from it as null (that works as I expect).
Double.PositiveInfinity and Double.NegativeInfinity are also saved and retrieved correctly.
So why Double.NaN is not working?
I use dotConnect for SQLite 5.11.1202.