using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[ args)
{
using (Test1 db = new Test1(Settings1.Default.ConnectionString))
{
StreamWriter sw = new StreamWriter(@"d:\log.txt");
sw.AutoFlush = true;
TextWriter tw = TextWriter.Synchronized(sw);
db.Log = tw;
var rs = from t1 in db.Table_1
join t3 in db.Table_3
on new { t1.ID } equals new { t3.ID }
select new { t1.ID, t3.FirstName, t3.LastName };
foreach (var r in rs) Console.WriteLine(r);
}
Console.Read();
}
}
}