How to get EFProf and EFProviderWrapper working together in on Entity Framework Connection

北城以北 提交于 2020-01-14 10:14:07

问题


Has anyone found a way to get Kowalski's EFProviderWrapper framework to run alongside Rhino's EFProf (Entity Framework Profiler) within the same Entity Framework context/connection? Currently if i try to register the EFProf Profiler while using an EntitytConnection wrapped with the EFProviderWrapper i get the following error at runtime when a new connection is attempted to be created:

Unable to cast object of type 'HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProfiledConnection' to type 'EFProviderWrapperToolkit.DbConnectionWrapper'.

From what I can gether it appears to be because EFProf is registering last, and EFProviderWrapperToolkit expects to be the last one registered. Im guessing that this requires a change to EFProviderWrapperToolkit possibly to create a new DbConnectionWrapper type that allows for non-EFProviderWrapper types? If anyone has any experience with multiple DBConnection provider frameworks then im all ears.


回答1:


After 3 years of inactivity I'm pretty certain the answer is:

Probably no.



来源:https://stackoverflow.com/questions/4846743/how-to-get-efprof-and-efproviderwrapper-working-together-in-on-entity-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!