public override object CoerceType(Type desiredType, object input)
{
try
{
// If we're on a non-string data type,
// treat a blank string as a null.
if (!desiredType.Equals(typeof (string)) &&
(input != null) &&
(input is string) &&
(((string) input).Trim().Length == 0))
{
return null;
}
}
catch (Exception e)
{
throw new DaoTypeCoercionException(desiredType, input, e);
}
return base.CoerceType(desiredType, input);
}