When I save a null value of Datetime is serialized as “0”.
Then when I read it back I get an ValueConverter exception that 0
is not a valid DateTime value.
Is that the default behavior?
Thanks
When I save a null value of Datetime is serialized as “0”.
Then when I read it back I get an ValueConverter exception that 0
is not a valid DateTime value.
Is that the default behavior?
Thanks
DateTime
is a value type so it can’t be null. If your DateTime column can be null it should be defined as a nullable DateTime?
so null
is a valid value. If you still have an issue please provide a code example that shows the issue.
It is configured as nullable.
So it wouldn’t be inserting a 0
value when null
. Please provide a reproducible code example when reporting issues.