Lets say I have the code
var Db = new MyEntities();
Random r = new Random();
// select a random customer out of the first 5
var customer = Db.Customers.OrderBy(c=>c.Id).Skip(r.Next(0, 5)).Take(1);
foreach (var c in customer)
{
c.WonPrice = true;
}
// How can I see here before saving the changes in order to see
// the query that will be sent to SQL server?
Db.SaveChanges();
When SaveChanges() is called how can I see in code the SQL statement that is generated?