So, you want to do an update but are wondering what the hec LINQ is doing. Turns out it is really easy. All you have to do is run in the debugger and add the Log option to your data context.
Here is an example:
DataClassesGeneralDataContext db3pLogicContext;
db3pLogicContext.Log = Console.Out;
var companyQuery = from tbl in db3pLogicContext.Companies
where tbl.ParentId != 0
select tbl;
int totalCntParents = companyQuery.Count();
foreach (DBAccess.Company co in companyQuery)
{
co.CreateDate = DateTime.Now;
break;
}
db3pLogicContext.SubmitChanges();
Now, when you run the code, you can look on your debugger output and see something that looks like this:
Also, if you want to actually execute select type statements, take a look at the Query Visualizer posted on Scott Guthrie's web site:
http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug-visualizer.aspx