N
Nemisis
HI everyone,
I think i am on the right path but if someone could confirm it, that
would be great.
In my business Layer i have my business object, for this example,
called User.
User has about 50 properties.
To save the user object in my business layer i call the factory and
pass in the object
Dim uf as new userFactory
Dim u as user
uf.save(u)
Now because the DAL and business layer shouldnt care about eachother, i
dont want to pass in a business object into my DAL, so at the moment i
pass in each property as a parameter to my save function in my DAL, is
this right??
'Save function in DAL
Function Save(userid as integer, firstname as string, lastname as
string, ............)
'Save function in BL
Function Save (u as user)
dim dal as new dataservice
dal.save(u.id, u.firstname, u.lastname, ..........)
End Function
Does this make sense? Hopefully i am right, but would like to know
what approach everyone takes. Thanks
I think i am on the right path but if someone could confirm it, that
would be great.
In my business Layer i have my business object, for this example,
called User.
User has about 50 properties.
To save the user object in my business layer i call the factory and
pass in the object
Dim uf as new userFactory
Dim u as user
uf.save(u)
Now because the DAL and business layer shouldnt care about eachother, i
dont want to pass in a business object into my DAL, so at the moment i
pass in each property as a parameter to my save function in my DAL, is
this right??
'Save function in DAL
Function Save(userid as integer, firstname as string, lastname as
string, ............)
'Save function in BL
Function Save (u as user)
dim dal as new dataservice
dal.save(u.id, u.firstname, u.lastname, ..........)
End Function
Does this make sense? Hopefully i am right, but would like to know
what approach everyone takes. Thanks