This error is expected in the scenario when a project contains more than one model and they are converted to the fluent mapping type. Fortunately, this is only a matter of code generation and can be easily fixed. Following are the details.
By default, when the Enhancer
tool processes a project that contains multiple metadatasource classes, it checks if the container names are the same and if the models are in one and the same namespace. In your situation, when you changed the mapping type of the models, the designer generated different container names for all of them (you can check the SetContainerSettings
methods in the metadatasource classes) and Enhancer threw an error to notify you about this. The resolution is to remove the following two code lines in all of the metadatasource classes:
As a note: Enhancer treats differently the .rlinq files and the fluent models. This is why you do not see such errors with multiple .rlinq files in the project.
Additionally, it is a good idea to check the connection strings. Given the fact that you have two different models, if they consume different databases, you need to have two semantically different connection strings. This section
in our documentation will provide you with further information about the consumption of multiple models.
I hope this helps.
Check out the latest announcement
about Telerik Data Access vNext as a powerful framework
able to solve core development problems.