Tracing and Caching Provider Wrappers for Entity Framework

This sample hows how to extend Entity Framework in interesting ways by plugging into ADO.NET provider interface.

C# (1.9 MB)
 
 
 
 
 
(14)
6,819 times
Add To Favorites
3/17/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to Ask a Question


  • GetManifestResourceStream throws NotSupportedException
    2 Posts | Last Post June 24, 2011
    • Hi,
      
      When looking for my manifest resources, ParseResources() (EntityConnectionWrapperUtils.cs, line 186) throws a NotSupportedException : "The invoked member is not supported in a dynamic assembly".
      
      This is due to this assembly: "Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", which is a dynamic assembly.
      
      Before calling "GetManifestResourceStream" (that throws the exception), you exclude Ecma and System assemblies. I suggest you should exclude Dynamic assemblies too :
      
      EntityConnectionWrapperUtils.cs, line 184 : foreach (Assembly asm in assembliesToConsider.Where(asm => !IsEcmaAssembly(asm) && !IsSystemAssembly(asm) && !asm.IsDynamic))
      
      Please, let me know what you think about this.
      
      Thank you for your great toolkit !
      
      Claire
    • I don't know if this will help you but I was getting a "dynamic library exception" and after a bit of searching I found that the "*" in the EF database connection string can be a cause.  It suggested that you replace the 3 occurrences of "*" with the name of the DLL (without the .dll) that contains your EF code. Cured my issue.
  • Velocity (aka AppFabric Cache) provider?
    2 Posts | Last Post June 16, 2011
    • I notice the current download no longer has support for AppFabric caching.  In the readme it says "6. Removed Velocity adapter and the demo."  However, the project description still shows using VelocityCache.  Can you clarify?  Are you adding back in or keeping it out?
    • Hi, I'm also trying to use AppFabric cache. Can you tell me if you succeeded in using it ?
      Thank you,
      
      Claire
  • CreateDatabase fails
    1 Posts | Last Post June 04, 2011
    • I cannot get the EFTracingProvider to work when calling CreateDatabase(). I get the following error:
      The provider manifest given is not of type 'System.Data.SqlClient.SqlProviderManifest'.
  • Code correction/fix
    2 Posts | Last Post May 11, 2011
    • I tried looking for some way to contribute but could not find anything on the site. I found one defect in the code which occurs when loading the wrapper if there are dynamically generated libraries included in the current AppDomain. In that circumstance EntityConnectionWrapperUtils will throw a NotSupportedException on line 186 (method ParseResources when calling asm.GetManifestResourceStream(resourceName)).
      Fix: just wrap the using call to asm.GetManifestResourceStream(resourceName) in a try/catch block filtering on exception NotSupportedException.
      
      Again, thank you for your efforts in providing the community with a good wrapper for the Entity Framework.
    • Igor, I'm curious to know in what scenario you get this error. I haven't encountered it yet and want to be prepared! :) THanks.
  • Version information included
    1 Posts | Last Post April 27, 2011
    • Thank you for the wrapper, I have found it very useful. I do have one request with the update of your page, could you post the version information again so we can see when something has changed and what has changed? I believe you provided this on the last page which was most useful.
21 - 25 of 25 Items   
« First   < Prev   1  2  3    Next >   Last »