Simple: intercept the QueryCreated event of the EntityDataSource
protected void EntityDataSource1_QueryCreated(object sender, QueryCreatedEventArgs e)
{
LabelX.Text = (e.Query as System.Data.Objects.ObjectQuery).ToTraceString();
}
var db = .... ObjectContext...
var query = (from x in TableName select x);
string sqlquery = (query as System.Data.Objects.ObjectQuery).ToTraceString();
Nessun commento:
Posta un commento