Answers for "how to query 2 tables in c# using linq extensions method"

C#
0

how to query 2 tables in c# using linq extensions method

List<DEPARTMENTs> list =   db.DEPARTMENTs.Join(db.DEPT_PROFILE, dept => dept.DEPT_CODE, prof => prof.DEPT_CODE, (dept,prof) => new {dept, prof})
            .Join(Wdb.WEB_ACCESS, depts => depts.prof.USER_ID,web => web.USER_ID,(depts,web) => new { depts, web})
            .Where(result => result.web.EMP_ID== id).Select(s => s.depts.dept).ToList<DEPARTMENTs>();
Posted by: Guest on May-24-2021

C# Answers by Framework

Browse Popular Code Answers by Language