How to construct DAL & BLL?!?!?
Posted on 2009-05-16
OK, I have had it!
How do you design DAL & BLL?!??!?? For love sakes!
Do you have methods like Open(), Close(), ExecuteScalar(string spName), ExecuteReader(string spName, DbParameter parameters), CreateParameter() etc. !??!?!?!?!??!?!?!?!?!!?!?!!??!?!?!?!?!?!?!?
Or do you have your entire logic in the DAL and just call the methods in the DAL class from the BLL class... with the exact same name as they appear in the DAL... just aliasing them... !?!!??!?!?
Do you have a class per entity???
How do you make them generic???
Do you have methods like GetEmpleyeeByID(string empID) in your BLL!?????!???
Or do you have methods like GetEntities().. ?!???
Do you open the connection directly for each method from the DAL...?? Or do you reveal the Open(), Close().. for the BLL to use!?
Do you use Try...Catch...Finally statements right on the DAL methods?? Or do you use them in the BLL??? Or do you even use them in the PL(UI)???
Some say this... some say this... and some say "use the wizards..." - I do not want use the wizards!!
So how the **** do you write DAL & BLL properly...
which can later on be used for other projects!?