-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.4
-
Component/s: None
-
None
The AsQueryable<T> extension method is currently declared as:
public static IQueryable<T> AsQueryable<T>(this MongoCollection collection)
and this requires you to provide the <T> argument explicitly. This is not a bad thing in a schema free database where the same collection can contain different kinds of documents. In practice though, it is common for a collection to contain only a single kind of document, and adding the following new overload of AsQueryable<T> would allow <T> to be deduced from the collection:
public static IQueryable<T> AsQueryable<T>(this MongoCollection<T> collection)
I can't see any reason why the two overloads can't coexist.