This question is locked. New answers and comments are not allowed.
Dear Telerik support team,
I have encounterred a problem while switching open access databases at runtime. The error message says:
"The config file reference for assembly '<assemblyname>' could not be resolved. Make sure that the referencing assembly uses at least one class of the referencing assembly as otherwise the compiler won't generate a reference."
I have an application with a presentation-, a business-, and a data access-layer. In the data access-layer I am switching the database dynamically at runtime to provide access to different customer databases. Depending on which customer is logging in, the proper database is loaded. For this, the business-layer contains all the business entities I am mapping with open access. All customer databases have the same mapping and entities.
This works fine when I add an object from a business-layer class in the data access-layer (e.g. BusinessLayer.Entities.User user). But when I do so, I violate the rules of assembly references for my project, because the business-layer may reference the data access-layer, but not the other way around.
Do you have any solution to solve this problem or a architecture suggest? Maybe there is a way to reference the assembly in the reference section of the config file without instantiate an object from BusinessLayer.Entities in the data access-layer. I override the config file at runtime by using the function AdjustForDynamicLoad() in the ObjectScopeProvider class (which is in the data access-layer).
Kind regards,
Christoph Tuchan
I have encounterred a problem while switching open access databases at runtime. The error message says:
"The config file reference for assembly '<assemblyname>' could not be resolved. Make sure that the referencing assembly uses at least one class of the referencing assembly as otherwise the compiler won't generate a reference."
I have an application with a presentation-, a business-, and a data access-layer. In the data access-layer I am switching the database dynamically at runtime to provide access to different customer databases. Depending on which customer is logging in, the proper database is loaded. For this, the business-layer contains all the business entities I am mapping with open access. All customer databases have the same mapping and entities.
This works fine when I add an object from a business-layer class in the data access-layer (e.g. BusinessLayer.Entities.User user). But when I do so, I violate the rules of assembly references for my project, because the business-layer may reference the data access-layer, but not the other way around.
Do you have any solution to solve this problem or a architecture suggest? Maybe there is a way to reference the assembly in the reference section of the config file without instantiate an object from BusinessLayer.Entities in the data access-layer. I override the config file at runtime by using the function AdjustForDynamicLoad() in the ObjectScopeProvider class (which is in the data access-layer).
Kind regards,
Christoph Tuchan