Geeks With Blogs
Chris Breisch   .NET Data Practices
Search this Blog!

Nullable types are exactly what data readers needed.  Dealing with database nulls in previous versions of .NET was laborious, to say the least.  However, just having the nullable types doesn’t solve all of your problems.  The classes presented here go a long way towards that goal, though.

From the introduction:

.NET 2.0 introduced nullable types into the CLR which, for the first time, provided the ability for value types to be assigned a null value. However, ADO.NET 2.0 did not introduce any new features specifically for dealing with nullable types. Therefore, one of the primary goals for the classes presented in this article is to provide a simple API for working with nullable types within the persistence layer.

There are three primary goals that the data readers will address.

  • Goal #1: Provide a simple, strongly-typed API for dealing with non-nullable types for both an IDataReader and a DataRow.
  • Goal #2: Provide a simple, strongly-typed API for dealing with nullable types for both an IDataReader and a DataRow.
  • Goal #3: Provide a unified interface so that the same code can be used polymorphically to consumer either an IDataReader or a DataRow.
Posted on Tuesday, January 31, 2006 8:30 AM Visual Studio , .NET Development | Back to top


Comments on this post: C# 2.0 Nullable Data Readers

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Chris J. Breisch | Powered by: GeeksWithBlogs.net