We have a new ASP.Net MVC4 project using EF ver.5. Will this EFTracingProvider work with ver. 5? Our entity class inherits from DbContext and not ObjectContext so what EFProviderWrapperToolKit class do I use in my Entities constructor so I can inject the providers into the DBContext?
I have been using this tool and it is great in capturing the SQL statement that EF send to DB. one requirement of the user team is, after they make the change, we need to capture and display the SQL statement that IS GOING TO be applied to DB, and allow a reviewer to review, before sending to database. Is it possible, that we can capture SQL statement that EF is about to execute, but without executing them? For example, changing Name of the BookEntity from "ABC"->"CDE"
and we can preview this change with SQL statement captured..
UPDATE BOOKS SET NAME='CDE' WHERE NAME='ABC' and ID=xxx
We have used EFProviderWrapperToolkit and developed own customized provider. The main purpose of own provider is to support connection pooling in multi-tenancy scenario.
It was working fine with EF4.3 Code First model, but stopped working with EF6.
I have posted my issue here:
It would be great if you can provide some guidance how to use them with EF6 and develop own provider? Or how can we achieve Connection Pooling?
I try to use the caching provider in our application with InMemoryCache (no ASP.NET), and it works great. The only issue is that our database also gets updated by a second and third application. Is there a way to let the cache in our primary application expire when there has been an insert or update from the 2nd or 3rd application? Or is there any other way to define the expiration criteria when using InMemoryCache?
Hope that anybody can answer this question.
Thank you and kind regards, Jeroen
I have the same question. For now I created a button in my application that just sets the cache to new EFCachingProvider.Caching.InMemoryCache() whenever I want my data to refresh. If you figure out how to make this happen automatically please share your method. Thanks.
I think you have to consider changing your concept.
Create a ModelLogic project that uses this project and share this modellogic with multiple businesslogic projects.
Also share the same cache service, now you reuse your entities through your projects.
We have been using this to avoid a query bug in Sybase ASA's ADO.NET drivers in our latest version.
In our environment the application servers works against approx 300-500 databases at the same time which all uses the same EF model (the metadata is on 7MB).
The problem occurs in normal use since the code in EntityConnectionWrapperUtils stores one metadata for each connectionstring in metadataWorkspaceMemoizer! A simple calculation shows that our memory usage will be approx 500*7MB=3.5GB in this single dictionary!
Right now we have removed the use of this wrapper from our code to avoid this problem (Sybase has also fixed their problem).
I just posted this to inform/warn others with large amount of database connections and this will cause serious performance/memory issues.
Hi, I skimmed through the code, but I didn't find any way to handle serialization. Is this a responsibility of the ICache implementation (if serialization is needed, like in the case of Azure distributed cache)?
The example shown states that you must define the cache type and caching policy on context creation... if I'm pretty much going to be enabling the caching policy to InMemoryCache and CacheAll, wouldn't it make more sense to define this in the constructor as default, instead of defining it every time I reference the Extended Entity Class, and if I need to use a different method, override it after context creation?