score:0

you can see AsQueryable's definition:

public static IQueryable<T> AsQueryable<T>(this MongoCollection<T> collection);
public static IQueryable<T> AsQueryable<T>(this MongoCollection collection);.

parameter was MongoCollection ...

you can change

return accounts.AsQueryable<Account>().ToList();

to

return accounts.FindAll();

Related Articles