FK collections in entity

Thread is closed for posting
2 posts, 0 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 08 Jun 2011 Link to this post


    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) 
    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?



  2. Damyan Bogoev
    Damyan Bogoev avatar
    581 posts

    Posted 13 Jun 2011 Link to this post

    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.
Back to Top