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();
Source: stackoverflow.com
Related Articles
- MongoDB Linq driver casting exception
- MongoDb c# driver LINQ vs Native query
- Mongo Driver Linq Query throws Exception
- LINQ Source Code Available
- Dynamic Linq Predicate throws "Unsupported Filter" error with C# MongoDB Driver
- MongoDB c# Driver - Perform a LINQ "Any" in a Serialized Dictionary
- Casting an object not supported in .NET MongoDB C# Driver
- Does MongoDb C# driver works with LINQ and dynamic documents?
- Is MongoDB C# Driver LINQ Query Syntax missing Async method?
- LINQ Select on GroupBy in MongoDB C# driver 2.1
- creating Linq to sqlite dbml from DbLinq source code
- MongoDB C# Linq driver with nullable types
- LINQ Where clause throws casting exception from string to Guid even though comparison only contains Guids
- MongoDb C# Driver with Group and Project using Aggregate() query giving exception
- Cannot get group items from group in GroupBy on IMongoQueryable mongodb c# driver linq statement
- Null reference exception in my LINQ to XML code
- source code for LINQ 101 samples
- Mongodb C# Driver Unsupported filter error with specific linq predicate
- Comparing dates in Mongodb with C# LINQ driver
- MongoDB C# Driver 'Cursor not found' with Linq query
- Visualizing MongoDB C# Linq query for Driver version 2.4
- LINQ NotSupportedOperation exception with Code First
- C# mongodb driver throwing System.InvalidOperationException on linq query with OrderByDescending
- C# Linq Driver to mongoDB - Bson Array
- c# Linq or code to extract groups from a single list of source data
- MongoDB using a C# driver and time interval LINQ
- mongodb c# driver SelectMany linq operator
- Mongodb c# driver Linq query Group by
- Should the MongoDb Official driver translate a Distinct() linq operator into a database operation?
- C# MongoDB Driver 2.15.0 unable to execute In Query with Linq
- How can I group on a specific amount of rows using LinQ?
- Is there an IEnumerable implementation that only iterates over it's source (e.g. LINQ) once?
- Join two lists based on a condition other than equals
- Why can't I project ToString() in VB?
- c# FsCheck cannot convert lambda expression
- Comparing very large List<string> with database table via LINQ to Entities
- How can an object-oriented programmer get his/her head around database-driven programming?
- Can I use LINQ to get more than 100 records back from a Quickbooks Online ServiceContext?
- When using LINQ, what is the difference between && and multiple where clauses?
- How to sort items alphabetically having same priority value?
- Comparing a list of CSV values in Linq to match those from second list with any value in first list
- XDocument from string has one element, need toDictionary
- DataTable need to sum a column with filter on it
- LINQ selecting all item array elements
- Use of LINQ to select a subset of option chains
- How to calculate count on of table column using group by clause in linq
- IEnumerable return First
- Entity Framework 5.0. Something like "any of" Query
- Error when using a Linq Expression variable instead of lambda expression directly
- How can I make this more concise?