I am very surprised that I am the first to mention this:
ADO.NET datasets do not display nullable columns as properties of nullable types. You should be able to write this:
int? i = myRec.Field; myRec.Field = null;
Instead, you should write this, which is just plain stupid:
int? i = (int?)myRec.IsFieldNull() ? (int?)null : myRec.Field; myRec.SetFieldNull();
This was annoying in .NET 2.0, and now it has become even more annoying that you need to use jiggery-pokery as mentioned above in your nice neat LINQ queries.
It is also annoying that the generated Add<TableName>Row method is also insensitive to the concept of types with a null value. Moreover, the generated TableAdapter methods TableAdapter not.
There is not much in .NET that makes me feel like the development team said, "Okay, boys, we're close enough, we're sending!" But that's for sure.
Robert Rossney Jan 05 '09 at 7:55 2009-01-05 07:55
source share