Schema has changed under me so that users FK is no longer in the entries table, but is indirectly referenced via the accounts table
I have the following tables:
Users
Accounts (FK from Users)
Entries (FK from Accounts)
I basically want to get the Entries for a particular user using LINQ from:
var userAccounts = context.User.Include("Accounts").Include("Entries").Where(s => s.UserId == userId);
This was the previous query before the User was removed from Entries:
return (from pc in userAccounts
select new Entry{
Timestamp = pc.Timestamp,
Log = pc.Log }).ToList().AsQueryable();
Just unsure how to traverse the tables and populate the Entry type
If you prefer an association based approach rather than joins, consider the following: