Any ideas as to why this query compiles, but then throws this runtime error:
Argument expression is not valid
I know I could change my db model, but in this case it's not possible. Any ideas how to get something like this working? Not even sure what this would be called. Thanks.
DBContext db = new DBContext();
var books = (from b in db.BOOKS
select new
{
b.ID,
b.NAME,
AuthorName = db.PEOPLEs.Where(p=>p.ID==b.AUTHOR).First().USER_ID,
}).ToList();