Ticket Q270644
Visible to All Users
Duplicate

Key Attribute DomainComponent

created 15 years ago

Hallo DevExpressTeam,
I have started to migrate some XPO classes to DC, my question is How do I define Key attribute.
I have pasted two classes so I want to use CountryISO3 as PrimaryKey in Country Class and as ForeignKey in State Class.
Thanks in advance
Max
    [DomainComponent,XafDefaultPropertyAttribute("Name")]
    public class ICountry
    {
        [FieldSize(3)]
        public string CountryISO3 { get; set; }
        [FieldSize(2)]
        public string CountryISO2 { get; set; }
        [FieldSize(64)]
        public string Name { get; set; }
        [FieldSize(8)]
        public string PhoneCode { get; set; }
        [FieldSize(3)]
        public string TLD { get; set; }
        [AggregatedAttribute]
        IList<IState> States { get; }
    }
    [DomainComponent, XafDefaultPropertyAttribute("LongName")]
    public class IState
    {
        ICountry Country { get; set; }
        [FieldSize(32)]
        public string ShortName { get; set; }
        [FieldSize(64)]
        public string LongName { get; set; }
    }

Show previous comments (4)
Dennis Garavsky (DevExpress) 14 years ago

    Hello Max,
    Can I make this ticket public?
    Regards,
    Dennis

      yes, you can :)
      Regards
      Max

      Dennis Garavsky (DevExpress) 14 years ago

        Thank you!

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.