score:0

Need to create a class with your result.

Please check the following way.

PropModel propModel = new PropModel();

            propModel  = (from t1 in table1
                          join t2 in table2 on t1.col1 equals t2.col1 into myTable1
                          from a in myTable1.DefaultIfEmpty()
                          join t3 in table3 on t1.col2 equals t3.col2 into myTable2
                          from b in myTable2.DefaultIfEmpty()
                          where t1.col1 == 1
                          select new
                          {
                              prop1 = b,
                              prop2 = myTable1.FirstOrDefault(),
                              prop3 = myTable1.Count()
                          }).FirstOrDefault();

public class PropModel
            {
                public table3 prop1 { get; set; }
                public table2 prop2 { get; set; }
                public Int32 prop3 { get; set; }
            }

Related Articles