This is a migrated thread and some comments may be shown as answers.

Connection ID issue

1 Answer 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jin
Top achievements
Rank 1
Jin asked on 06 Sep 2012, 04:55 AM
I create two Domain classes to map two different table in one project with the same connection id. After I run my application, I found when I retrieve data from one domain class, it works fine and retrieve data from another domain class, it will throw exception:
Type is enhanced and registered, but not available from the database class meta data. This can be caused by a wrong connection id or configuration.

Then I modify the connection id as a different value in one domain class and copy a connection string with modified connection id, all works fine. My concern is whether every domain class need to use a unique connection ID to map?

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 10 Sep 2012, 03:10 PM
Hello Jin,

 The connection string is not bound to a domain class but a domain model instead.You should have as many connection strings as models (.rlinq files) that you have in your application that access the same database. There is also an approach that allows for expanding the model metadata during runtime without changing the connection string and ultimately allowing to work with only one connection string in all modules  of an application. Here is a link to a help article describing the mentioned approach.

Greetings,
Zoran
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Tags
General Discussions
Asked by
Jin
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or