Posted on: 10/17/2014 2:58:44 PM | Views : 396

Hi Forum, 
I am trying to tidy up my code a bit and have noticed some I think could be done better. What I do is below. but I have no need to have any persistence or maintain DAL state at all.
Private _WebsiteDB As New WebSiteDAL Public Function UpdatePotd(WebsiteId As UInt16, Potd As PictureOfTheDayDto) As Boolean Return _WebsiteDB.UpdatePotd(WebsiteId, Potd) End Function It is more efficient to do this
Public Function UpdatePotd(WebsiteId As UInt16, Potd As PictureOfTheDayDto) As Boolean Dim _WebsiteDB As New WebSiteDAL Return _WebsiteDB.UpdatePotd(WebsiteId, Potd) End Function I do have lots of functions in the BLL layer, so I would be adding the _websiteDB in all my BLL methods. It seems to me like more lines of code, but might be slightly performance as the DAL Obj is closed when ...

Go to the complete details ...