// C # expression
// Courses
//. Join (
// Coursesections,
// Course => course. courseid,
// Section => section. courseid,
// (Course, section) => Course
//)
//. Where (course => (course. type = 3 ))
// C # Statement (s)
VaR courseinfo = from course in courses
Join section in coursesections
On course. courseid equals section. courseid into myleftjoin
From result in myleftjoin. defaultifempty ()
Select Course;
VaR coursetype3 = courseinfo. Where (course => course. type = 3 );
Coursetype3.dump ();
// C # Program
// Void main ()
//{
// Var courseinfo = getcourseinfo ();
// Courseinfo. Dump ();
//}
//
// Public class courseinfo {
// Public int courseid {Get; set ;}
// Public int sectionid {Get; set ;}
//}
//
// Public list <courseinfo> getcourseinfo (){
// Var courseinfo = (from course in courses
// From section in coursesections
// Where course. courseid = Section. courseid
// Select new courseinfo {
// Courseid = course. courseid,
// Sectionid = Section. sectionid
//}). Tolist ();
// Return courseinfo;
//}
Linqpad usage Summary