Answers for "left join in entity framework 6.0"

2

left join in entity framework 6.0

var query = from u in usergroups
            join p in UsergroupPrices on u.UsergroupID equals p.UsergroupID into gj
            from x in gj.DefaultIfEmpty()
            select new { 
                UsergroupID = u.UsergroupID,
                UsergroupName = u.UsergroupName,
                Price = (x == null ? String.Empty : x.Price) 
            };
Posted by: Guest on April-10-2020

Code answers related to "left join in entity framework 6.0"

Browse Popular Code Answers by Language