Im trying to overwrite the behavior of the custom where clause to look at an index.
So I have a custom collection with a custom where method.
snippet..
public IndexedDbSet<T> : IdbSet<T> // IdbSet<T> : IQueryable<T>
{
public IEnumerable<T> Where ( Expression<Func<T,bool>> predicate) `
{
}
}
Im calling it like this var blastNum = collection.Where( x => x.SiteId ==siteId).ToList();
however when i run a where on the collection it calls the extension method in corelib.
I have tried returning IQueryable as well..
Is this behavior expected ? Is there a better way ?
Note i have an existing code base that does a lot of LINQ to a DB however i need it to go to memory and for 1M+ records brute force takes too long. Its a Windows Store app.
Note not the same as order of precedence on interface because i'm calling it directly not the interface ,its LINQ that maybe changing the behavior.