locked
Linking Tables with RIA and Entity Framework RRS feed

  • Question


  • http://msdn.microsoft.com/en-us/library/ff713719%28v=vs.91%29.aspx

    I just used the simple walk through (link above) to setup my project.  I have my tables entities in my  EDMX and all I'm trying to do is join a few tables to grab information from a several.  I can query my tables and pull down information one table at a time but can't figure out and find an example that talks about joining them.  Would I join a table to two in the EDMX. It seems like I should be able to Click on the entity scroll past all the columns and there I find "Add Table or View" -- Here I can add a table but how do I specify how the tables relate/join (primary and secondary keys)? Can someone help and point me to some documentation, you can see I'm really green.

    Thanks

    Christine

    Wednesday, October 10, 2012 6:01 PM

Answers

  • Hi Christine,

    Welcome to the MSDN forum.

    For “join a few tables”, do you mean you want to create associations/relationship between tables?

    If you use Database First approach which means the entity models are generated by existing tables in database, the association will be created automatically (If two end entities are included in edmx). If you use Model First which means you create the entity models then generate database from models, you can add an association by right clicking the empty area of designer.

    If I misunderstood anything, please feel free to let me know.

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us


    Friday, October 12, 2012 5:46 AM