I have used SPMetal to create a data context. I can query my lists. The queries return an object of the type of list that they are in. Is it possible to convert this type into a normal SPListItem object?
1 Answer
i think you can call it directly if im correct:
List<SPListItem> items = (from l in list.Items.OfType<SPListItem>() where l["KPI Status"] != null && Convert.ToInt32(l["KPI Status"]) == 1 select l).ToList<SPListItem>();
hope this helps :)
-
-
sorry the answer was based on his title, Get SPListItem from LINQ :) Jul 31, 2014 at 12:44