N
Nemisis
Hi everyone,
i am creating my own DAL and BLL, and i am not using typed datasets.
My problem is that in my DAL i have a Save method whos signiture looks
something like:
Save(ID as integer, name as string, .......
Within my BLL, i call then same method (the business layer version)
something like this
Save (pCompany as company)
The latter of the two seems better to me as u dont have to write out
all the variables, and a problem could occur if someone passed in a
value of the wrong type.
I think it would be alot better to have both the DAL and BLL signiture
look like
Save (pCompany as company)
If i wanted to do this, were would i store the business objects? The
DAL?? The BLL?? Or do i even create a separate class library that
both the DAL and BLL must reference??
Also, if i do this, i will have to change my DAL to return objects,
instead of returning DataRows, DataTables and DataSets, like it does
at the moment, is this right? i am not merging the two by accident am
i??
I do not want to using any of the microsoft code that you can download,
but if someone could please let me know about the above, i would be
very greatful.
Cheers
i am creating my own DAL and BLL, and i am not using typed datasets.
My problem is that in my DAL i have a Save method whos signiture looks
something like:
Save(ID as integer, name as string, .......
Within my BLL, i call then same method (the business layer version)
something like this
Save (pCompany as company)
The latter of the two seems better to me as u dont have to write out
all the variables, and a problem could occur if someone passed in a
value of the wrong type.
I think it would be alot better to have both the DAL and BLL signiture
look like
Save (pCompany as company)
If i wanted to do this, were would i store the business objects? The
DAL?? The BLL?? Or do i even create a separate class library that
both the DAL and BLL must reference??
Also, if i do this, i will have to change my DAL to return objects,
instead of returning DataRows, DataTables and DataSets, like it does
at the moment, is this right? i am not merging the two by accident am
i??
I do not want to using any of the microsoft code that you can download,
but if someone could please let me know about the above, i would be
very greatful.
Cheers