none
Unique key and association feature RRS feed

  • Question

  • HI

    Just interested in knowing if there is any plans to support "Unique Key" associations in EF. We know we can use primary keys and related foreign keys to associate parent-child entities. 

    But let's say we have in addition to the primary key, some other unique key also and we want to use this to create association between one to one or one to many tables. A concrete example may be an order and loan table. Let's say order and loan table have one to one relationship. The loan table has LoanId as it's primary key. Also LoanNumber is unique key in the loan table. Let's also say we store LoanNumber in Order table and want to use this to create association between the two entities. When we try to setup this relationship, we get some weird error in EF "Same number of columns are not there in relationship...".

    It was not supported at  least till EF5, but not sure if there is any plans to support it in future. Any info will be greatly appreciated.


    Thanmal Verma

    Friday, May 23, 2014 8:11 PM

Answers