Otis wrote:
Hmmm... according to what they posted in the thread, it should work regardless of what o/r mapper is used, as long as it supports linq. But if it requires a component, how would it work if the component has to produce the query?
If I think about it, it looks like they want some IQueryable object to be provided and they then go from there. So say I want to fetch customers with a filter, I then do:
LinqMetaData metaData = new LinqMetaData(adapter);
someDevExpressControl.RootSource = metaData.Customer; // implements IQueryable
and from there they'll query the data as they'll call extension methods on metaData.Customer... at least that's what I think they'll do. I see no other way.
(this comes down to this code:
var q1 = metaData.Customer;
var q2 = q1.Where(c=>c.Country=="Slovenia");
var q3 = q2.Select(c=>c.CompanyName);
and then enumerate q3
Well, yes, absolutely. I was thinking the same.
In fact there is LinqServerModeSource control that does what we thought. And the code might look like (Linq to Sql):
DataClasses1DataContext context = new DataClasses1DataContext();
linqServerModeSource1.QueryableSource = from c in context.Categories select c;
gridControl1.DataSource = linqServerModeSource1;
So, to answer whether XtraGrid will work with any Linq thing out there: yes, as long as it implements IQueryable.