I'm sure this has been asked before, but my perusal of the search hits for similar questions did not yield an answer.
I am tired of checking if Nullable has a value. Why can't I assign myNullable<int> yourAge
to int myAge
and get an exception if yourAge
is null? Furthermore, if either of our damned ages is null, why do I have to do a fxning check to avoid assigning 'deafault' to a fxning SqlParameter? I can't even do a civilised mySqlParm = myAge.HasValue ? myAge.Value : DBNull.Value
.
What is the fxning point of nullable types? We still have to use `-1' for a pkId to avoid the dreaded Null. We can't even add our own extension menthods because 'blah blah'.
Why even fxning bother with parameters at all? Why don't we just store all dates as fxning varchar(10)?