SPquery Results in an IEnumerable

On one of my SharePoint projects where I had to build a timer job I wanted to write it as DRY as possible. What I did was to remove the three SPList queries (records were chained in a parent, child, child hierarchy) and put in place a controller and a data access class that returned an IEnumerable of SPListItems.

By sending the SPList name and CAML query I was able to remove a couple blocks of code and make the SPQuery a lot more generic.

Posted in sharepoint

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>