Quick way to print out generated sql
If you are working from an EF context, the context has its own LOG. This can be written out to your development console (see example below).
context.Log = Console.Out;
DataClassesDataContext context = new DataClassesDataContext(); IEnumerable<Order> result = context.Orders; var product = result.Where(x => x.OrderID == 12); context.Log = Console.Out;
Leave a Reply