protected void Page_Load(object sender, EventArgs e)
{
System.IO.TextWriter log;
string path = @"c:\TestLinqSQL.txt";
log = System.IO.File.AppendText(path);
using (LinqDemoTestDataContext SDataContext = new LinqDemoTestDataContext("http://win"))
{
SDataContext.Log = log;
var item = (from policy in SDataContext.Product
where policy.MyNumber == "HasModified"
select policy).Single();
if (item != null)
{
item.MyNumber = "1111111111";
}
SDataContext.SubmitChanges();
log.Close();
};
}