I'm not sure if I've undestood your plan but to get an IQueryable from a IEnumerable you could use the Queryable.AsQueryable(IEnumerable) extension method.
BTW, during the query you should be able to use the EntitySet.source property (or at least you could use the method used in DataContext.SetEntitySetsQueries() to identify the IQueryable underling the entityset) That's probably not enougth but it's something to start with... Giacomo On Fri, Jun 19, 2009 at 9:17 PM, yuniti <[email protected]> wrote: > > I'm trying to get some of the basics of DataLoadOptions to work, > having a little bit of difficulty and just thought i'd ask here for > some feedback > > The difficulty i'm having is converting the AssociateWith expression > to one that can be used in a database query > > AssociateWith is called as such: AssociateWith<SomeTable>(table => > table.SomeEntitySet.Where(otherTable => otherTable.ID>5)) > The expression passed in to AssociateWith is that of an IEnumerable > (because EntitySet is an IEnumerable), but to call > Provider.CreateQuery, I need an IQueryable > > > Can you guys think of any simple way to convert an IEnumerable > expression to an IQUeryable expression? Or is the only way to go > manually creating calls into an IQueryable from the IEnumerable calls? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
