using System.Collections.Generic;
public string Field1 = "This is Field1";
public string Field2 = "This is Field2";
public string FieldA = "This is FieldA";
public string FieldB = "This is FieldB";
public static void Main()
var ListOfTable1 = new List<Table1>()
new Table1(0), new Table1(1), new Table1(2)}
var ListOfTable2 = new List<Table2>()
new Table2(0), new Table2(0), new Table2(0)}
join t2 in ListOfTable2 on t1.Table1_id equals t2.Table2_id into j1
from j2 in j1.DefaultIfEmpty()
ManySubObjects = (from g in ga select g).FirstOrDefault() == null ? null : (from g in ga select new {
foreach (var result in query)
Console.Write(result.Table1_id + ", ");
Console.Write(result.Field1 + ", ");
Console.Write(result.Field2 + ", ");
Console.Write((result.ManySubObjects == null ? 0 : result.ManySubObjects.Count()));