mongodb/mongo-csharp-driver — pull request #139 by einaregilsson (2012-11-18 21:23:24+00:00)
Title: Linq index

Couple of features for the Linq provider to make it more powerful, and more on par with the lower level API:

1. Explain extension method on IQueryable

```
BsonDocument plan =
collection.AsQueryable().Where(o=>o.Name == "test").Explain();
```

2. WithIndex extension method on IQueryable, for index hinting. Can take a string or BsonDocument:

```
collection.AsQueryable().Where(o=>o.Name == "test").WithIndex("foo").ToList();
collection.AsQueryable().Where(o=>o.Name == "test").WithIndex(new BsonDocument("Name",1).ToList();

```