In “Programming Entity Framework”, 2nd edition by Julia Lerman, in chapter dedicated to Entity SQL, p. 115, we have the following example of using query builder method to do projection using EF 4.1 .Where
and .Select
with string parameters:
ObjectQuery<DbDataRecord> contacts = context.Contacts
.Where("it.FirstName='Robert'")
.Select("it.Title, it.FirstName, it.LastName");
I am using Entity Framework 6, .Net 4.6, VS 2015. The compiler complains that there are no .Where
and .Select
that accept string parameters, only lambdas. Is there any solution how to follow this book example?