Entity Framework - View Sql using toTraceString
You can view the generated SQL from an IQueryable using .ToString()
, e.g.
var query = context.People.Where(x => x.DomainId == 1);
Console.WriteLine(query.ToString());
You can view the generated SQL from an IQueryable using .ToString()
, e.g.
var query = context.People.Where(x => x.DomainId == 1);
Console.WriteLine(query.ToString());