angular-datatables
angular-datatables copied to clipboard
left join with group by linq lambda expression c#?
i want to write left join using linq lambada expression. i have try query using join but now i want to create using left join so any one can help me how can do.
here this is my query:
var UserList = db.UserInfo
.Join(db.Coruse, u => u.id, c => c.userid, (u, c) =>
new { u, c }).GroupBy(r => r.u.id)
.Select(g => g.OrderByDescending(r => r.c.datetime)
.FirstOrDefault()).OrderByDescending(a => a.u.datetime).ToList();
using this query i don't want user data those who are not in coruse taable so i want to this data also in coruse table in userid in or not.
Wrong repository?