1

Closed

EF6 tracing does not work with Precompiled Views

description

Hi ,

After I run your Command, the EF6 tracing no longer works. is there anything I should do to be able to generate precompiled views and still be able to trace raw Sql executed by EF6?


InteractiveViews
                    .SetViewCacheFactory(
                        ctx,
                        new FileViewCacheFactory(HttpRuntime.AppDomainAppPath + "\\MyViews.xml"));
//This code no longer works
ctx.Database.Log = message => Debug.WriteLine(message);


thanks
Phil
Closed Jul 17, 2016 at 4:52 AM by moozzyk
No follow up. Closing.

comments

moozzyk wrote Jan 26, 2016 at 3:46 AM

I don't see this happen. I inserted this line ctx.Database.Log = message => System.Diagnostics.Debug.WriteLine(message); into this file https://efinteractiveviews.codeplex.com/SourceControl/latest#InteractivePregeneratedViewsTests/FunctionalTests/DatabaseViewCacheScenarioTests.cs in line 34 (right after var connectionString = ctx.Database.Connection.ConnectionString;) and I debugged the test. My breakpoint was hit and I see the queries being written to the output window.