M
myname
Hello,
I map objects to a DB.
Currently, I have a shared function like :
clsCustomer.getForId(customerId as integer) as clsCustomer.
It returns Nothing when the customerId does not exist.
I would like to do that within the New :
clsCustomer.New(customerId as integer)
But how can I handle the non-existence of customerId then ?
Is it possible that New returns Nothing ?
Would it be better to throw an Exception ?
Thanks !
I map objects to a DB.
Currently, I have a shared function like :
clsCustomer.getForId(customerId as integer) as clsCustomer.
It returns Nothing when the customerId does not exist.
I would like to do that within the New :
clsCustomer.New(customerId as integer)
But how can I handle the non-existence of customerId then ?
Is it possible that New returns Nothing ?
Would it be better to throw an Exception ?
Thanks !