3 ms·
Yes we can mock databases and queries in C# var oldMen = from p in context.Persons where p.Sex == “M” && p.Age > 65; “context” could be an Entity Framework co
by scarface74 7y ago
Yes we can mock databases and queries in C#
var oldMen = from p in context.Persons where p.Sex == “M” && p.Age > 65;
“context” could be an Entity Framework context that would generate sql at runtime, an IMongoQueryable that would generate MongoQuery at runtime or an in memory List<Person> that would generate the equivalent foreach loop with an if condition (overly simplified) while running your tests.