I am trying to do this in petapoco
var people
= db.Query<Person>("SELECT * FROM people").Where(p =>
p.FirstName.Equals("George") && p.LastName.Equals("Clooney")).ToList();
the problem is that it gets the entire set of records from the database and then performs the filtration on it. I tried Fetch instead of query, same result.
How do I write the query so that it sends the query to get the filtered results from the database, instead of doing the filtering at the webserver?
or using NPoco (which which is based off PetaPoco) this is also possible