What's the best way to extend a class generated in the DAL in the BLL of an application. All layers are seperate applications and compiled independently.
What I want to do is add some business logic to the class so that it can be pulled through to the presentation layer.
I can easily extend it in the DAL but strict programming says it should go in the BLL
Any thoughts?
Extending DAL class in BLL
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Akkiraju IvaturiRank #474 · 5.2K pointsPosted Aug 24, 2012, 11:26 PM EDT
Always make sure that view layer never reference data access project DLL anytime. The blind way of dealing this is go and delete the dll from the bin folder of the web application or website and handle the errors through code in BLL if at all the view layer is referencing the Data Access DLLs.
Stefan D2 pointsPosted Aug 24, 2012, 11:55 PM EDT
I forgot to add that the class I was extending was just the data structure and no actual methods/functions.
Basically, I have several bit columns that I want to display as a status message. I.e. if the cancelled column is true, then this new method returns "Cancelled" or if the invoiced column is true than return "Invoiced".
I rather not change the DB schema and can complete this in the DAL but wanted to move it to the BLL for function separation.
Akkiraju IvaturiRank #474 · 5.2K pointsPosted Aug 25, 2012, 12:59 PM EDT
If you have any other questions, please feel free to ask me.