Mapper Behavior


Author
Message
Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
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?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Daniel Essin - 19 Years Ago
StrataFrame Team - 19 Years Ago
Daniel Essin - 19 Years Ago
StrataFrame Team - 19 Years Ago
                     great!
Daniel Essin - 19 Years Ago
                         Looks like we'll be releasing this next week along with the DevExpress...
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search