Handling linq skip, take, and order by in the DAL rather than in-memory BL?

Handling linq skip, take, and order by in the DAL rather than in-memory BL?

Old forum URL: forums.lhotka.net/forums/t/8318.aspx


rcollette posted on Friday, January 08, 2010

I realize that the CSLA list objects are optimized for in memory queries, however, what if I want to handle some of those operations at the database level?

I know I can create a fetch operation with my own filter/paging/sorting criteria, but is there some predefined "IPageable" interface that is defined by either Microsoft or CSLA.NET which I should be implementing or is that something I just need to design on my own?

The basis for this question comes out of studying the CSLADataSource class in conjunction with reading the book and coming to the realization that A) the "TypeSupportsPaging", "TypeSupportsSorting" properties of CSLADataSource and IReportTotalRowCount are fairly undocumented. and B) I can't seem to fine what uses these properties or if they serve any purpose other than as a runtime indicator to my own code.   Realizing that I might have to implement this myself, in the BL and given that it is a common sceanario

I would have thought there there was some sort of predefined interface in the BL for this.  Perhaps methods I could just hand off the CSLADataSource events to or ways of overriding or intercepting various link expressions.  I just seems like something is missing here if I have to code that logic, in my own way, into every pageable list.

Thanks,
Rich

ps. Looking forward to the Feb Code Mastery event.








RockfordLhotka replied on Friday, January 08, 2010

rcollette:

The basis for this question comes out of studying the CSLADataSource class in conjunction with reading the book and coming to the realization that A) the "TypeSupportsPaging", "TypeSupportsSorting" properties of CSLADataSource and IReportTotalRowCount are fairly undocumented

The sorting/paging functionality is documented in the Using CSLA .NET Version 2.1 Handbook ebook (http://store.lhotka.net).

There's also some information in the Web Forms FAQ: http://www.lhotka.net/cslanet/faq/WebFormsFaq.ashx

 

Copyright (c) Marimer LLC