score:0

Accepted answer

I found a solution:

At first it seems that with the DataLoadOptions is something not okay, at second its not clever to load a table with 30 Coloumns when you only need 1.

To Solve this, I make a view which covers all nececeery fields and of course the join.

It reduces the time from 5.0 seconds to 230ms!

score:0

If you want to get rid of the LoadWith, you can select your field explicitly :

public static List<Tuple<UserPM, User> > GetAllPMsAsReciepient(Guid userID)
{
    using (var dataContext = new RPGDataContext())
    {
        return (
            from a in dataContext.UserPMs 
            where a.RecieverID == userID 
            && !a.IsDeletedRec 
            orderby a.Timestamp descending 
            select Tuple.Create(a, a.User1)
        ).ToList();
    }
}

Related Articles