Group: Forum Members
Posts: 235,
Visits: 309
|
I just did a rebuild of a bo and the partial class after the rebuild had a blank namespace instead of what had been there before.
Also, I was doing this to get rid of the dreaded NULL error message when there is a null field in the result set. The default behavior of this is really less than useful - in fact it is a pain in the butt. So I thought that I would change the fields in the mapper to nullable generic. Having done so I get code like this:
public Nullable MIDDLENAME
{
get
{
object loValue;
loValue = this.CurrentRow["MIDDLENAME"];
if (loValue == DBNull.Value)
{
return (Nullable)null;
}
else
{
return (Nullable)loValue;
}
}
set
{
if (value.HasValue)
{
this.CurrentRow["MIDDLENAME"] = value.Value;
}
else
{
this.CurrentRow["MIDDLENAME"] = DBNull.Value;
}
}
}
And the following error message when I try to compile:
The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable'
What now?
|