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

StackOverflow https://stackoverflow.com/questions/4846743

  •  27-10-2019
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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

Probably no.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top