Anuj Varma Software • Cloud • Security • AI

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;

Anuj holds professional certifications in Google Cloud, AWS as well as certifications in Docker and App Performance Tools such as New Relic. He specializes in Cloud Security, Data Encryption and Container Technologies.

Initial Consultation

Anuj Varma – who has written posts on Anuj Varma.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.