I have fields in the database defined like this:
[OperationWeight] [real] NULL,
[OperationCost] [money] NULL,
I convert them in my iHydratable like this:
OperationWeight = Convert.ToSingle(Null.SetNull(dr.Item("OperationWeight"), OperationWeight))
OperationCost = Convert.ToDecimal(Null.SetNull(dr.Item("OperationCost"), OperationCost))
when they are Null they some out like this:
OperationWeight OperationCost
-3.402823E+38 -79228162514264337593543950335
I have a lot of these type of fields that may be null that I need to be able to round trip in a normal fashion. I'm not doing anything special in the Info.vb, but I feel like I should be:
' <summary>
' Gets and sets the OperationWeight
' </summary>
Public Property OperationWeight() as Single
Get
Return _operationWeight
End Get
Set(ByVal Value as Single)
_operationWeight = Value
End Set
End Property
' <summary>
' Gets and sets the OperationCost
' Dollar cost allocated to this operation
' </summary>
Public Property OperationCost() as decimal
Get
Return _operationCost
End Get
Set(ByVal Value as decimal)
_operationCost = Value
End Set
End Property