LLBLGenProDataSource2 and IQueryable

Posts   
 
    
neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 22-Jun-2010 20:33:34   

2.6 October 2009, Adapter, Win 7

This might be a dumb question, but can I get the LLBLGenProDataSource2 to accept an IQueryable instead of an EntityCollection?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 23-Jun-2010 03:16:40   

No, LLBLGenProDataSource(2) only consumes EntityCollections. If you want to use IQueryables as the source you should use LinqDataSource/LinqServerModeDataSource.

David Elizondo | LLBLGen Support Team
neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 23-Jun-2010 09:39:54   

Do I lose anything by using the LinqServerModeDataSource from DevExpress rather than the LLBLGenProDataSource2? The documentation makes it look like an easy change for me to do.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Jun-2010 10:31:51   

One thing you loose is the 2-way databinding. As you can save data back or delete records using LLBLGenProDataSource.

neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 23-Jun-2010 10:40:32   

That would be a show-stopper. The LinqServerModeDataSource seems to be able to do this by setting EnableUpdate="true". Is it just with an IQueryable<EntityCollection> it can't?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Jun-2010 11:00:17   

And how would the LinqServerModeDataSource perform the Update?

neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 23-Jun-2010 11:03:10   

This Northwind example shows it:

http://www.devexpress.com/Support/Center/e/E313.aspx

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Jun-2010 11:08:22   

What I mean it won't be using LLBLGen to Update the data, right?

neilx
User
Posts: 267
Joined: 02-Nov-2007
# Posted on: 23-Jun-2010 12:58:23   

Without trying to do it in a project I don't know. I will assume you know better than me and go back to the LDS as I need to do updating and I know it works if I convert my Linq to an EntityCollection beforehand. Thanks for your help!