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;
string[ ids = {"1", "3"};
var rs = from t2 in db.Table_2
let i = t2.ID.ToString()
where ids.Contains(i)
select new { t2.ID, t2.Number };
foreach (var r in rs) Console.WriteLine(r);
}
Console.Read();
}
}
}