using MongoDB.Bson.Serialization; using MongoDB.Driver; namespace ConsoleApp4 { internal class Program { static void Main(string[] args) { Console.WriteLine("Test 2 without ClassMap"); try { var test = GetQueryable1().Where(x => x.Value == 1).ToList(); Console.WriteLine(test.Count); } catch (Exception ex) { Console.WriteLine(ex.Message); } } public class Entity { public int Value { get; set; } } public class MongoEntity : Entity { public int Internal { get; set; } } private static IQueryable GetQueryable1() { var mongoClient = new MongoClient("mongodb://localhost"); var mongoDatabase = mongoClient.GetDatabase("test"); var mongoCollection = mongoDatabase.GetCollection("test1"); return mongoCollection.AsQueryable(); } } }