If listOfPossibleCars is relatively static (does not change at all or at least not often), you can indeed put it into database as described in another answer. When it's not the case and assuming you use sql server, you can use table valued parameters. Note that Entity Framework is VERY slow with Contains, especially on long lists.
First create custom table type in database:
CREATE TYPE MyType AS TABLE
(
CarName varchar(200) primary key
)
Then query like this (note that this is code right from my head and not tested, so ask if something doesn't go well):
var listOfPossibleCars = new List<string>();
var dt = new DataTable();
dt.Columns.Add("CarName");
foreach (var car in listOfPossibleCars) {
dt.Rows.Add(car);
}
var possibleCars = new SqlParameter("possibleCars", SqlDbType.Structured);
possibleCars.Value = dt;
possibleCars.TypeName = "dbo.MyType";
var listOfCars = db.Cars.SqlQuery("select C.* from Cars C inner join @possibleCars P on C.CarName = P.CarName", possibleCars).ToList();
Yes you have to use raw sql query, but if your list is really huge - you cannot do such query efficiently with Entity Framework alone.