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

Create Table Associations Across Entity Modals

1 Answer 38 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.
Andrew
Top achievements
Rank 1
Veteran
Iron
Andrew asked on 26 Feb 2015, 07:36 PM
I have create a DLL that contains 2 entity modals one called Student, the other called Course to keep my modals clean.

What I want to know is can I create an association between a table in the student modal and a table in the Course modal so when using the modal in and applications I write you will not be able to tell that the tables are across 2 different modals.

eg: student.Cources.GetActive()


Thanks,

1 Answer, 1 is accepted

Sort by
0
Doroteya
Telerik team
answered on 02 Mar 2015, 09:52 AM
Hi Andrew,

Thank you for contacting us.

Currently, Telerik Data Access cannot create associations between entities that reside in two different .rlinq files, but as long as the database behind the two models is one and the same, with another feature of ours you can achieve both the logical separation and the association. Following are the details:

The Multiple Diagrams feature allows you to split a single .rlinq file into more than one diagram - in your case all the entities relevant to Student can reside in one diagram and all tables relevant to Course can reside in another. The multiple diagrams can be created either during the generation of the model or afterwords, when you decide that you need the logical separation. 

As for a workflow you could apply, I would suggest to you the following guidelines:
1. Create a single .rlinq file and in it add the entities for both Student and Course - the recommended way to achieve this is by reverse mapping the database, but if this is not an option you could manually merge the XML representation of the .rlinq files.
2. Create the necessary association.
3. Split the model to multiple diagrams in Visual Designer.

I hope this helps. Do let us know, if you need additional information or assistance.


Regards,
Doroteya
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Veteran
Iron
Answers by
Doroteya
Telerik team
Share this question
or