Does Enterprise Library have builtin support to covert empty strings to null on save to the database?

Topics: Data Access Application Block
Feb 13, 2010 at 1:20 PM

I'm using Enterprise Library 4.1 and wanted to save value objects that contain a default value to save as a Null value in the database.

Examples include:

  1. Convert empty strings to null
  2. Convert min date value to null

I'm also looking at the other side, when a null value is returned from the database. I have a wrapper function that looks for a null and returns the object with its default value. I was wondering if this functionality can be turned on within the library.

Feb 15, 2010 at 2:45 AM

Hi,

I believe that there is no built in that comes with DAAB as you've describe. It is something that you must write in your custom code.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com