I'm looking through the documentation on Auditing and Dependency injection and theres a part that i don't quite understand.
How can i override the CreateAuditor method of the generated code to return an Auditor that is not in the genereted code's assembly?
Here's the basic idea:
MyApplicationABC - contains a config dependencyInjectionInfo section which points to MyBusinessLogicABCAssembly.
MyBusinessLogicABCAssembly - contains MyAuditorABCClass which inherits from AuditorBase
MyGeneratedCode.DAL -- here SomeEntity class would have an overridden CreateAuditor method which would return MyBusinessLogic.MyAuditorClass -- but how, since the generated code assembly has not reference to MyBusinessABCLogicAssembly?
Also, if i understand this i should be able to create another app MyApplicationXYZ and then create a different MyBusinessLogicXYZ with MyAuditorXYZ as well. But then how to i ensure that the generated code uses MyAuditorXYZ?
In Short, is it possible to ensure that the correct auditor is used by the generated DAL only with dependency injection? or do i need to always attach the proper auditor in the code using SomeEntity.AuditorToUse = MyAuditorXYZ?