issues when using log()

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
yusufbs
Posts: 2
Joined: Wed 19 Jan 2011 15:31

issues when using log()

Post by yusufbs » Wed 26 Jan 2011 16:12

hi

I am using devart linqConnect Model

I want to see the sql that my linq statement generates

So I am using this code

StreamWriter httpResponseStreamWriter = new StreamWriter(Response.OutputStream);
dc.log = httpResponseStreamWriter ;


Generates the sql, but entire sql is not displayed (this table has more that 200 columns)
var req = from re in cb.Requests
where re.Requestid == "{d6022fb5-2883-4e37-ac37-b7964c12ea1c}"
select re;


does not generate the sql
var req = from re in cb.Requests
where re.Requestid == "{d6022fb5-2883-4e37-ac37-b7964c12ea1c}"
select re.Requestid;


does not generate the sql
var req = from re in cb.Requests
join eq in cb.Equifaxes
on re.Requestid equals eq.Requestid
where re.Requestid == "{d6022fb5-2883-4e37-ac37-b7964c12ea1c}"
select re.Requestid;
select new zzz
{
name = re.FirstName,
score = eq.FicoScore
};


There are no errors in any of the linqs

Also when using devart entity model, i dont even have the log method to see the sql

Can somebody please let me know why this is happening and how do I get past it

Thanks

Yusufbs

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 27 Jan 2011 16:14

Please check the Response.BufferOutput property, this can be the reason of displaying only a part of the log. As an alternative, check the log using simple StringWriter, and check if it is populated correctly.
As for Devart Entity models, Entity Framework does not provide embedded Context-level tracing tools. You can either use the ToTraceString method, or use DBMonitor.
Here is an article about DBMonitor application usage. In case you prefer to have a component in your application, not a standalone tracing application, check out this article.

Post Reply