<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jaroslaw Kowalski : Providers</title><link>http://blogs.msdn.com/jkowalski/archive/tags/Providers/default.aspx</link><description>Tags: Providers</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using EFProviderWrappers with precompiled views</title><link>http://blogs.msdn.com/jkowalski/archive/2009/06/15/using-efproviderwrappers-with-precompiled-views.aspx</link><pubDate>Mon, 15 Jun 2009 19:06:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9753672</guid><dc:creator>jkowalski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/jkowalski/comments/9753672.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jkowalski/commentrss.aspx?PostID=9753672</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jkowalski/rsscomments.aspx?PostID=9753672</wfw:comment><description>&lt;p&gt;One of the users has reported a problem with using &lt;a href="http://code.msdn.com/EFProviderWrappers"&gt;EFProviderWrappers&lt;/a&gt; and precompiled views together.&lt;/p&gt;  &lt;p&gt;When you pre-compile views, Entity Framework calculates a hash of metadata (which includes csdl,ssdl and msl information), stores it with the generated views and compares it later when metadata is loaded. When loaded metadata doesn’t match the hash stored in pre-compiled views, an exception is thrown.&lt;/p&gt;  &lt;p&gt;Injecting a provider into provider chains involves changing SSDL file and that invalidates the hash.&lt;/p&gt;  &lt;p&gt;Fortunately there’s a workaround, which enables you to use pre-compiled views and wrapper providers together, but you have to use the &lt;a href="http://blogs.msdn.com/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx#alternativeinjection"&gt;Alternative injection method as described in original blog post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Let’s assume you have followed the steps outlined in the post and have your modified SSDL file ready. Injecting is a bit tricky because of additional registration required for EdmGen.exe to work. The first part involves creating a modified version of EdmGen.exe which can handle wrapper providers:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create a working directory (say “&lt;strong&gt;C:\ViewGeneration&lt;/strong&gt;”) &lt;/li&gt;    &lt;li&gt;Copy &lt;strong&gt;%WINDIR%\Microsoft.NET\Framework\v3.5\EdmGen.exe&lt;/strong&gt; and &lt;strong&gt;%WINDIR%\Microsoft.NET\Framework\v3.5\EdmGen.exe.config&lt;/strong&gt; to that directory &lt;/li&gt;    &lt;li&gt;Open &lt;strong&gt;C:\ViewGeneration\EdmGen.exe.config&lt;/strong&gt; using notepad &lt;/li&gt;    &lt;li&gt;Add Provider Registration section before the end of the configuration file so that it looks like this:      &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;configuration&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;runtime&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;generatePublisherEvidence&lt;/span&gt; &lt;span class="attr"&gt;enabled&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;runtime&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="rem"&gt;&amp;lt;!-- declare provider factories --&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;system.data&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DbProviderFactories&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EF Caching Data Provider&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;invariant&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFCachingProvider&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Caching Provider Wrapper&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFCachingProvider.EFCachingProviderFactory, EFCachingProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def642f226e0e59b&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EF Tracing Data Provider&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;invariant&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFTracingProvider&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Tracing Provider Wrapper&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFTracingProvider.EFTracingProviderFactory, EFTracingProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def642f226e0e59b&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EF Generic Provider Wrapper&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;invariant&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFProviderWrapper&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;description&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Generic Provider Wrapper&amp;quot;&lt;/span&gt;
           &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFProviderWrapperToolkit.EFProviderWrapperFactory, EFProviderWrapperToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def642f226e0e59b&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DbProviderFactories&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;system.data&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;configuration&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/li&gt;

  &lt;li&gt;Copy &lt;strong&gt;EFTracingProvider.dll, EFCachingProvider.dll&lt;/strong&gt; and &lt;strong&gt;EFProviderWrapperToolkit.dll&lt;/strong&gt; to &lt;strong&gt;C:\ViewGeneration&lt;/strong&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;(Alternatively you can just gac all the providers and put provider registration section in machine.config, but I think the described method is cleaner as it has only local impact and doesn’t require you to be an administrator).&lt;/p&gt;

&lt;p&gt;Once you have the modified EdmGen.exe, you can use it for your view generation as usual, except that you pass modified ssdl file as an argument to /inssdl parameter.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;C:\ViewGeneration\EdmGen.exe 
    /mode:viewgeneration 
    /incsdl:NorthwindEFModel.csdl 
    /inssdl:NorthwindEFModel.WithTracing.ssdl 
    /inmsl:NorthwindEFModel.msl 
    /outviews:NorthwindEF.views.cs&lt;/pre&gt;

&lt;p&gt;This should create you NorthwindEF.views.cs which you can compile along with the rest of your application to get better startup performance.&lt;/p&gt;

&lt;p&gt;Now, one more cool trick:&lt;/p&gt;

&lt;p&gt;Wrapper-enabled EdmGen.exe can be used not just for view generation. For example it is possible to automatically generate a model from a database using EFTracingProvider! (this will create SSDL file which takes advantage of tracing automatically).&lt;/p&gt;

&lt;pre class="csharpcode"&gt;C:\ViewGeneration\EdmGen.exe 
    /mode:FullGeneration
    /provider:EFTracingProvider
    /connectionString:&lt;span class="str"&gt;&amp;quot;wrappedProvider=System.Data.SqlClient;server=.\SQLEXPRESS;database=NorthwindEF;integrated security=sspi&amp;quot;&lt;/span&gt; /project:NW&lt;/pre&gt;

&lt;p&gt;You can even use tracing provider &lt;u&gt;during&lt;/u&gt; reverse-engineering process, to see what SQL statements are executed. All you need to do is add this section to &lt;strong&gt;C:\ViewGeneration\EdmGen.exe.config&lt;/strong&gt;:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;appSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="rem"&gt;&amp;lt;!-- this setting causes all log messages to be written to the console. --&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;key&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EFTracingProvider.logToConsole&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;appSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9753672" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jkowalski/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.msdn.com/jkowalski/archive/tags/Caching/default.aspx">Caching</category><category domain="http://blogs.msdn.com/jkowalski/archive/tags/EFProviderWrappers/default.aspx">EFProviderWrappers</category><category domain="http://blogs.msdn.com/jkowalski/archive/tags/Providers/default.aspx">Providers</category></item><item><title>Tracing and Caching for Entity Framework available on MSDN Code Gallery</title><link>http://blogs.msdn.com/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx</link><pubDate>Thu, 11 Jun 2009 20:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9727163</guid><dc:creator>jkowalski</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/jkowalski/comments/9727163.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jkowalski/commentrss.aspx?PostID=9727163</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jkowalski/rsscomments.aspx?PostID=9727163</wfw:comment><description>&lt;P&gt;We have just &lt;A href="http://code.msdn.com/EFProviderWrappers" mce_href="http://code.msdn.com/EFProviderWrappers"&gt;released a sample&lt;/A&gt; that shows how to extend Entity Framework in interesting ways by plugging into ADO.NET provider interface. The sample provides two extensions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;STRONG&gt;EFTracingProvider&lt;/STRONG&gt; – which adds the ability to log all SQL commands that are executed (similar to LINQ to SQL’s DataContext.Log&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;STRONG&gt;EFCachingProvider&lt;/STRONG&gt; – which adds transparent query results cache to EF &lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The sample comes with implementation of distributed cache which uses &lt;A href="http://blogs.msdn.com/velocity/archive/2009/04/08/announcing-velocity-ctp3.aspx" mce_href="http://blogs.msdn.com/velocity/archive/2009/04/08/announcing-velocity-ctp3.aspx"&gt;Velocity CTP 3&lt;/A&gt; as well as an adapter for ASP.NET and simple in-memory cache implementation.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Because the sample is quite large and uses many advanced techniques, it’s impossible to fully explain it all in one blog post. In this first post I’ll briefly explain the idea of wrapper providers and describe the new the APIs exposed by EFTracingProvider and EFCachingProvider. In future posts I’ll try to explain more technical detail details and provide advanced logging/caching tips.&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;Provider Wrapers&lt;/H3&gt;
&lt;P&gt;Entity Framework has a public provider model which makes it possible for provider writers to support 3&lt;SUP&gt;rd&lt;/SUP&gt;-party databases, such as Oracle, MySQL, PostreSQL, Firebird. The provider model provides uniform way for EF to query the capabilities of the database and execute queries and updates using canonical query tree representation (as opposed to textual queries).&lt;/P&gt;
&lt;P&gt;Whenever you issue a LINQ or Entity SQL query through an ObjectContext instance, the query passes through a series of layers (see the picture below). At high level we can say that all queries and updates from ObjectContext are translated and executed through EntityConnection, which in turns talks to server-specific data provider such as SqlClient or Sql Server CE client. &lt;/P&gt;
&lt;P&gt;Provider interface used by Entity Framework is stackable, which means it’s possible to write a provider which will wrap another provider and intercept communication between Entity Framework and the original provider. &lt;/P&gt;
&lt;P&gt;The wrapper provider gets a chance do interesting things, such as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Examining query trees and commands before they are executed &lt;/LI&gt;
&lt;LI&gt;Controlling connections, commands, transactions, data readers, etc. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jkowalski/WindowsLiveWriter/TracingandCachinginEntityFrameworkavaila_860F/image_3.png" width=528 height=408 mce_src="http://blogs.msdn.com/blogfiles/jkowalski/WindowsLiveWriter/TracingandCachinginEntityFrameworkavaila_860F/image_3.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EFTracingProvider&lt;/STRONG&gt; intercepts DbCommand.ExecuteReader(), ExecuteScalar() and ExecuteNonQuery() and sends details about the command (including command text and parameters) to configured outputs.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EFCachingProvider&lt;/STRONG&gt; is a bit more complex. It uses external caching implementation and caches results of all queries queries that are executed in DbCommand.ExecuteReader(). Whenever update is detected (either UPDATE, INSERT or DELETE) the provider invalidates affected cache entries by evicting all cached queries which were dependent on any of the updated tables.&lt;/P&gt;
&lt;H3&gt;Using the sample code&lt;/H3&gt;
&lt;P&gt;Here’s a step-by-step guide to downloading and using the sample code in your project:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Download the sample project from MSDN Code Gallery and built it. &lt;/LI&gt;
&lt;LI&gt;Take &lt;B&gt;EFCachingProvider.dll&lt;/B&gt;, &lt;B&gt;EFTracingProvider.dll&lt;/B&gt; and &lt;B&gt;EFProviderWrapperToolkit.dll&lt;/B&gt; and place them in a common directory for easy referencing. &lt;/LI&gt;
&lt;LI&gt;Add reference to those three assemblies in your application. &lt;/LI&gt;
&lt;LI&gt;Register the providers – either: 
&lt;OL&gt;
&lt;LI&gt;Locally for your application (recommended) – put registration entries in App.config (see Provider Registration section below) and make sure that provider DLLs are in your application directory (adding reference and building should take care of that). &lt;/LI&gt;
&lt;LI&gt;Globally: GAC the providers and add required registration entries (see Provider Registration section below) to machine.config &lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;
&lt;LI&gt;Copy &lt;B&gt;EFProviderWrapperDemo\ExtendedNorthwindEntities.cs&lt;/B&gt; from the sample and put it in your project – rename the class as appropriate – you will need to use this class instead of a regular strongly typed object context class. &lt;/LI&gt;
&lt;LI&gt;Modify the base class by replacing NorthwindEntities with the name of your strongly typed object context class. &lt;/LI&gt;
&lt;LI&gt;Modify the default constructor by providing your own connection string. &lt;/LI&gt;
&lt;LI&gt;(optional) You can also modify the second constructor by specifying which wrapper providers to use. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;That’s it. &lt;/P&gt;
&lt;H3&gt;Caching and Tracing APIs&lt;/H3&gt;
&lt;P&gt;By using &lt;B&gt;ExtendedNorthwindEntities&lt;/B&gt; which was created in previous step, instead of &lt;B&gt;NorthwindEntities&lt;/B&gt; you get access to new APIs which control caching and tracing:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; TextWriter Log { get; set; }&lt;/PRE&gt;
&lt;P&gt;Specifies the text writer where log output should be written - same as in LINQ to SQL &lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; ICache Cache { get; set; }&lt;/PRE&gt;
&lt;P&gt;Specifies which cache should be used for the context (typically a global one). The sample comes with 3 implementations of ICache interface which you can be used in your applications:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;AspNetCache – cache which uses ASP.NET caching mechanism &lt;/LI&gt;
&lt;LI&gt;InMemoryCache – simple, in-memory cache with basic LRU expiration policy &lt;/LI&gt;
&lt;LI&gt;VelocityCache – implementation of caching which uses Microsoft Distributed Cache codename "Velocity" CTP3. &lt;/LI&gt;&lt;/UL&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; CachingPolicy CachingPolicy { get; set; }&lt;/PRE&gt;
&lt;P&gt;Specifies caching policy. There are 3 policies included in the package:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;CachingPolicy.CacheAll – caches all queries regardless of their results size or affected tables &lt;/LI&gt;
&lt;LI&gt;CachingPolicy.NoCaching – disables caching &lt;/LI&gt;
&lt;LI&gt;CustomCachingPolicy – includes user-configurable list of tables that should and should not be cached, as well as expiration times and result size limits. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;It is also possible to write your own caching policy by creating a class which derives from CachingPolicy and overriding a bunch of methods.&lt;/P&gt;
&lt;P&gt;For more advanced logging scenarios there are also 3 events, which provide access to raw DbCommand objects and some additional information:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;event&lt;/SPAN&gt; EventHandler&amp;lt;CommandExecutionEventArgs&amp;gt; CommandExecuting
&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;event&lt;/SPAN&gt; EventHandler&amp;lt;CommandExecutionEventArgs&amp;gt; CommandFinished
&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;event&lt;/SPAN&gt; EventHandler&amp;lt;CommandExecutionEventArgs&amp;gt; CommandFailed&lt;/PRE&gt;
&lt;P&gt;The events are raised before and after each command is executed. &lt;/P&gt;
&lt;H3&gt;Global configuration&lt;/H3&gt;
&lt;P&gt;You can also configure logging defaults through static properties of EFTracingProviderConfiguration class and they will apply to all new contexts:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;bool&lt;/SPAN&gt; LogToConsole { get; set; }&lt;/PRE&gt;
&lt;P&gt;Specifies whether every SQL command should be logged to the console. &lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; LogToFile { get; set; }&lt;/PRE&gt;
&lt;P&gt;Specifies global log file. &lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; Action&amp;lt;CommandExecutionEventArgs&amp;gt; LogAction { get; set; }&lt;/PRE&gt;
&lt;P&gt;Specifies global custom logging action – a delegate that will be invoked before and after each command is executed.&lt;/P&gt;
&lt;H3&gt;Tracing Example&lt;/H3&gt;
&lt;P&gt;In order to write all SQL commands to a file, you must create a text writer object to write to and assign it to context.Log:&lt;/P&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (TextWriter logFile = File.CreateText(&lt;SPAN class=str&gt;"sqllogfile.txt"&lt;/SPAN&gt;))
{
  &lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (var context = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ExtendedNorthwindEntities())
  {
    context.Log = logFile;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=rem&gt;// ... &lt;/SPAN&gt;
  }
}&lt;/PRE&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Logging to the console is even easier:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (var context = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ExtendedNorthwindEntities())
{
  context.Log = Console.Out;&amp;nbsp;&amp;nbsp; &lt;SPAN class=rem&gt;// ... &lt;/SPAN&gt;
}&lt;/PRE&gt;
&lt;P&gt;More advanced logging can be achieved by hooking up Command*events:&lt;/P&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (var context = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ExtendedNorthwindEntities())
{
  context.CommandExecuting += (sender, e) =&amp;gt;
  {
   Console.WriteLine(&lt;SPAN class=str&gt;"Command is executing: {0}"&lt;/SPAN&gt;, e.ToTraceString());
  };
  context.CommandFinished += (sender, e) =&amp;gt;
  {
    Console.WriteLine(&lt;SPAN class=str&gt;"Command has finished: {0}"&lt;/SPAN&gt;, e.ToTraceString());
  };&amp;nbsp;&amp;nbsp; &lt;SPAN class=rem&gt;// ... &lt;/SPAN&gt;
}&lt;/PRE&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;To enable tracing globally for all connections (to both console and a log file):&lt;/P&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;&lt;PRE class=csharpcode&gt;EFTracingProviderConfiguration.LogToConsole = &lt;SPAN class=kwrd&gt;true&lt;/SPAN&gt;;
EFTracingProviderConfiguration.LogToFile = &lt;SPAN class=str&gt;"MyLogFile.txt"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2 face=Consolas&gt;&lt;FONT size=2 face=Consolas&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;H3&gt;
&lt;H3&gt;Caching Example&lt;/H3&gt;&lt;/H3&gt;
&lt;P&gt;In order to use caching using InMemoryCache implementation, you must create global instances of your cache and caching policy objects:&lt;/P&gt;&lt;PRE class=csharpcode&gt;ICache cache = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; InMemoryCache(); 
CachingPolicy cachingPolicy = CachingPolicy.CacheAll;&lt;/PRE&gt;
&lt;P&gt;In order to use caching with Velocity CTP3, you must create DataCache object and pass it to VelocityCache constructor.&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; ICache CreateVelocityCache(&lt;SPAN class=kwrd&gt;bool&lt;/SPAN&gt; useLocalCache)
{
  DataCacheServerEndpoint endpoint = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; DataCacheServerEndpoint(&lt;SPAN class=str&gt;"localhost"&lt;/SPAN&gt;, 22233, &lt;SPAN class=str&gt;"DistributedCacheService"&lt;/SPAN&gt;);
  DataCacheFactory fac = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; DataCacheFactory(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; DataCacheServerEndpoint[] { endpoint }, useLocalCache, useLocalCache);

  &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; VelocityCache(fac.GetCache(&lt;SPAN class=str&gt;"Velocity"&lt;/SPAN&gt;));
}&lt;/PRE&gt;
&lt;P&gt;Now in order to use either of the caches we need to set up Cache and CachingPolicy properties on the context:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (var context = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ExtendedNorthwindEntities())
{
  &lt;SPAN class=rem&gt;// set up caching&lt;/SPAN&gt;
  context.Cache = cache;
  context.CachingPolicy = cachingPolicy;&amp;nbsp;&amp;nbsp; &lt;SPAN class=rem&gt;// ... &lt;/SPAN&gt;
}&lt;/PRE&gt;
&lt;H3&gt;Configuring Providers&lt;/H3&gt;
&lt;H5&gt;Provider Registration&lt;/H5&gt;
&lt;P&gt;Before a provider can work with Entity Framework it must be registered, either in machine.config file or in application configuration file. Configuration for each provider specifies the factory class and gives it three names, two of which are human-readable name and one - provider invariant name is used to refer to the provider in the connection string and SSDL.&lt;/P&gt;
&lt;P&gt;Configuration for the providers included in the sample looks like this:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.data&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;DbProviderFactories&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EF Caching Data Provider"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;invariant&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFCachingProvider"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;description&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Caching Provider Wrapper"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFCachingProvider.EFCachingProviderFactory, EFCachingProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def642f226e0e59b"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EF Tracing Data Provider"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;invariant&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFTracingProvider"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;description&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Tracing Provider Wrapper"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFTracingProvider.EFTracingProviderFactory, EFTracingProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def642f226e0e59b"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EF Generic Provider Wrapper"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;invariant&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFProviderWrapper"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;description&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Generic Provider Wrapper"&lt;/SPAN&gt;
         &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFProviderWrapperToolkit.EFProviderWrapperFactory, EFProviderWrapperToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=def642f226e0e59b"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;DbProviderFactories&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.data&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This XML fragment can be copied/pasted into any project which needs to use EF provider wrappers or put in the machine.config to be shared by all applications.&lt;/P&gt;
&lt;H3&gt;Injecting into provider chain&lt;/H3&gt;
&lt;P&gt;In order to inject the provider into the provider chain, you have to modify SSDL files for your project as well as the connection string. There are two ways to do so: automated (which requires application code changes) or manual which can be done externally just by changing configuration file and SSDL file.&lt;/P&gt;
&lt;P&gt;In order to create an EntityConnection with injected wrapped providers, you can use the provided helper method:&lt;/P&gt;&lt;PRE class=csharpcode&gt;connection = EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers(
  connectionString, &lt;SPAN class=str&gt;"EFTracingProvider"&lt;/SPAN&gt;, &lt;SPAN class=str&gt;"EFCachingProvider"&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;You can then pass &lt;STRONG&gt;connection&lt;/STRONG&gt; to ObjectContext constructor or use the connection to run ESQL queries as usual. &lt;/P&gt;&lt;A title=alternativeinjection name=alternativeinjection&gt;&lt;/A&gt;
&lt;H3&gt;Alternative injection method&lt;/H3&gt;
&lt;P&gt;If you cannot change the application code, you have to make the modifications manually, which involves changing SSDL file and the connection string. Let’s take a quick look to see what SSDL and connection string look like today: The provider name is specified in the Provider attribute of the &amp;lt;Schema/&amp;gt; element:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;Schema&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Namespace&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="NorthwindEFModel.Store"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;Alias&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Self"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;Provider&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="&lt;U&gt;&lt;STRONG&gt;&lt;FONT size=3&gt;System.Data.SqlClient&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;ProviderManifestToken&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;2005&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;xmlns&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://schemas.microsoft.com/ado/2006/04/edm/ssdl"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Provider invariant name is also be specified in the connection string:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="NorthwindEntities"&lt;/SPAN&gt;
       &lt;SPAN class=attr&gt;connectionString&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="metadata=NorthwindEFModel.csdl | NorthwindEFModel.msl | NorthwindEFModel.ssdl;
                         provider=&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;System.Data.SqlClient&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;; 
                         provider connection string=&amp;amp;quot;Data Source=.\sqlexpress;
Initial Catalog=NorthwindEF;Integrated Security=True;MultipleActiveResultSets=True&amp;amp;quot;"&lt;/SPAN&gt;
       &lt;SPAN class=attr&gt;providerName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="System.Data.EntityClient"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;In order to inject our own provider we need to override those to point to our provider. In SSDL, we put the name of the new provider in the Provider attribute and concatenate the previous provider with its provider manifest token in the ProviderManifestToken field, like this:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN class=html&gt;xml&lt;/SPAN&gt; &lt;SPAN class=attr&gt;version&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="1.0"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;encoding&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="utf-8"&lt;/SPAN&gt;?&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;Schema&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Namespace&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="NorthwindEFModel.Store"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;Alias&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Self"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;Provider&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="&lt;STRONG&gt;&lt;FONT size=3&gt;&lt;U&gt;EFCachingProvider&lt;/U&gt;&lt;/FONT&gt;&lt;/STRONG&gt;"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;ProviderManifestToken&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;System.Data.SqlClient;2005&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;"&lt;/SPAN&gt;
  &lt;SPAN class=attr&gt;xmlns&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://schemas.microsoft.com/ado/2006/04/edm/ssdl"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Modifying connection string is a bit different – we need to put the pointer to the new *.ssdl, change provider name and add new keyword to provider connection string:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="NorthwindEntities"&lt;/SPAN&gt;
       &lt;SPAN class=attr&gt;connectionString&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="metadata=NorthwindEFModel.csdl | NorthwindEFModel.msl | &lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;NorthwindEFModel.Modified.ssdl&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;;
                         provider=&lt;STRONG&gt;&lt;U&gt;&lt;FONT size=3&gt;EFCachingProvider&lt;/FONT&gt;&lt;/U&gt;&lt;/STRONG&gt;; 
                         provider connection string=&amp;amp;quot;&lt;U&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;wrappedProvider=System.Data.SqlClient;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;Data Source=.\sqlexpress;&lt;BR&gt;Initial Catalog=NorthwindEF;Integrated Security=True;MultipleActiveResultSets=True&amp;amp;quot;"&lt;/SPAN&gt;
       &lt;SPAN class=attr&gt;providerName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="System.Data.EntityClient"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;H5&gt;Specifying tracing configuration in the configuration file:&lt;/H5&gt;
&lt;P&gt;It is also possible to specify tracing configuration in App.config file. The following parameters are available:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;appSettings&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=rem&gt;&amp;lt;!-- write log messages to the console. --&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;key&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFTracingProvider.logToConsole"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;value&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="true"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    
  &lt;SPAN class=rem&gt;&amp;lt;!-- append log messages to the specified file --&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;add&lt;/SPAN&gt; &lt;SPAN class=attr&gt;key&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EFTracingProvider.logToFile"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;value&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sqllog.txt"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;appSettings&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;H3&gt;Limitations and Disclaimers&lt;/H3&gt;
&lt;P&gt;The providers have not been extensively tested beyond what’s included in the sample code, so you should use tem at your own risk. &lt;/P&gt;
&lt;P&gt;As with any other sample, Microsoft is not offering any kind of support for it, but if you find bugs or have feature suggestions, please use this blog’s contact form and let me know about them.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9727163" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jkowalski/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.msdn.com/jkowalski/archive/tags/Caching/default.aspx">Caching</category><category domain="http://blogs.msdn.com/jkowalski/archive/tags/EFProviderWrappers/default.aspx">EFProviderWrappers</category><category domain="http://blogs.msdn.com/jkowalski/archive/tags/Providers/default.aspx">Providers</category></item></channel></rss>