I have a Linq provider that sucessfully goes and gets data from my chosen datasource, but what I would like to do now that I have my filtered resultset, is allow Linq to Objects
If you implemented a Repository Pattern you could get away with just providing an IQueryable back and abstract away the table.
Example:
var qry = from c in MyProv.Repository()
Join o in MyProv.Repository() on c.OrderID equals o.ID
select new
{
CustID = c.ID,
OrderID = o.ID
}
and then just build your provider to model the IQueryable pattern in your Repository method just like this article illustrates.
This way, you can write all kinds of providers to use for whatever you need. You can have a LINQ 2 SQL provider, or write an in memory provider for your unit tests.
The Repository method for the LINQ 2 SQL provider would look something like this:
public IQueryable Repository() where T : class
{
ITable table = _context.GetTable(typeof(T));
return table.Cast();
}