I have a SQL query
var sql = "Select * From Foo Where Bar = {0}"
I want to execute this using Entity Framework, but I want to impose an extra restriction, to see if column Id is in a certain range:
List<int> ids = ...;
var MyFoos = context.Foos.SqlQuery<Foo>(sql).Where(x => ids.Contains(x.Id));
Is this likely to result in efficient selection from the database, or would it end up executing the whole of "Select * From Foo Where Bar = {0}" first and only then filtering for the IDs?