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

FK collections in entity

1 Answer 39 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.
Erik
Top achievements
Rank 2
Erik asked on 08 Jun 2011, 12:26 PM
Hi,

I find that the FK Collections in the entities are far from logic. I think the name should include the entity fieldname, at least.

an example:

I have a table Orders. In that table a have, among others, 2 fields called OrderContactID and BillingContactID. Both are FK's to the Contact table. 
The Entity Order does now have, among others, 2 properties:
Public Overridable ReadOnly Property Contacts As IList(Of Contact) 
and
Public Overridable ReadOnly Property Contacts1 As IList(Of Contact) 

So, now in code, lateron, I do not have a clue witch one is what; while BillingContactID_Contacts would be a revealing name...

is there a way to do this in the code generation template?

Thanks,


Erik


1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 13 Jun 2011, 10:31 AM
Hello Erik,

You could rename the property's name by doing the following steps:
-    Select the class property from the visual designer;
-    Set the Name option from the Properties Window grid;
-    Save the diagram;
Hope that helps.

All the best,
Damyan Bogoev
the Telerik team
Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 2
Answers by
Damyan Bogoev
Telerik team
Share this question
or