B
Big Dave
Does anyone have suggestions on how to best handle errors in business
objects that are part of a business layer? For example:
Public Class Person
Private _name as string
Public Property Name as string
Get
Return _name
End Get
Set(Value as string)
If Value.toString.length > 50 then
'How do I send a friendly error message back to the
presentation layer saying the value isn't correct? I know I can
validate it on the form, but I'd like to also validate in the business
objects.
Else
_name = Value
End If
End Set
End Property
End Class
Thanks in advance for any help!!!
Big Dave
objects that are part of a business layer? For example:
Public Class Person
Private _name as string
Public Property Name as string
Get
Return _name
End Get
Set(Value as string)
If Value.toString.length > 50 then
'How do I send a friendly error message back to the
presentation layer saying the value isn't correct? I know I can
validate it on the form, but I'd like to also validate in the business
objects.
Else
_name = Value
End If
End Set
End Property
End Class
Thanks in advance for any help!!!
Big Dave