none
EF Designer from Database with association RRS feed

  • Question

  • Hi,

    I hope I selected the right category and forum otherwise let me know.

    I have simply added a EF From database workflow and it generated all the tables all right on the designer.  Now I'm trying to add an association from Customer to Contact and the first thing I get when I compile is Property is not mapped.  See image below.  What do I have to do ?  I don't see the CustomerId in the mapping below so I can't map it or there's something I don't understand


    Wednesday, February 4, 2015 2:52 PM

Answers

  • Ok after looking at the Relationships tutorial for SQL on YouTube I understood that I had to do it in SQL so my model could be generated the right way

    • Marked as answer by GearWorld Wednesday, February 4, 2015 3:42 PM
    Wednesday, February 4, 2015 3:41 PM

All replies

  • Now I deleted the association and the CustomerId field in Contact and build then I tried creation the assosiation again and now I have a different message

    Error 1 Error 3004: Problem in mapping fragments starting at line 135:No mapping specified for properties Contact.CustomerId in Set Contacts.
    An Entity with Key (PK) will not round-trip when:
      Entity is type [CustomerManagerModel.Contact]
     C:\MyWork\WPF\ClientManager\CustomerModel.edmx 136 15 ClientManager


    • Edited by GearWorld Wednesday, February 4, 2015 3:14 PM
    Wednesday, February 4, 2015 2:59 PM
  • Ok after looking at the Relationships tutorial for SQL on YouTube I understood that I had to do it in SQL so my model could be generated the right way

    • Marked as answer by GearWorld Wednesday, February 4, 2015 3:42 PM
    Wednesday, February 4, 2015 3:41 PM