Last post Oct 20, 2011 04:43 AM by stuartm9999
Oct 17, 2011 04:52 PM|Nugs|LINK
Quick question. Is it best practive to get a int count of record from the DAL or BLL? It seems to me that returning a full set of records from the DAL only to count them in the BLL is a bit heavey... But i want to make sure that i am building my DAL to standard...
Oct 17, 2011 05:03 PM|sukumarraju|LINK
I think that DAL is the right layer as it is to do with Count(*) i.e., number of records being returned rather than any business rule related to any application.
Oct 17, 2011 05:07 PM|Nugs|LINK
Thank you sir, i will go with that as i tend to agee with you! :)
Oct 20, 2011 04:43 AM|stuartm9999|LINK
DAL seems the right place to me. If it's part of a paging strategy of some sort - consider returning the count with your data as an output value or return value - reducuse the number of database calls.