Problem generating model edmx with foreign key RRS feed

  • Question

  • Hello friends I have a problem a little complex, I'm using the default DB users of ASP.NET related to other tables:

    I have a model Edmx in Visual Studio 2010 and I want to update adding the tables in the image. I press for this right click where the model (Graphically), and give the option to update model from database, then add the tables that appear in the image. When I press the end I will review the model (Graphically) and has not added the table "aspnet_UsersInRoles" also did not create the relationship between the tables "aspnet_Users" and "USUARIOxCONSULTORIO" and throws me the following error:

    Error 3015: Problem in mapping fragments starting at 2988, 2994::Foreign key constraint 'FK__USUARIOxC__UserI__30592A6F'  from table USUARIOxCONSULTORIO (UserId) to table tabla aspnet_Users (UserId):: Insufficient mapping: Foreign key must be mapped to some AssociationSet or EntitySets participating in a foreign key association on the conceptual side.

    I appreciate your help


    PD: I can do Sql Server queries again without problems using the same data model


    Monday, May 7, 2012 3:33 PM

All replies

    What is in the AssociationSet <tags> in  the edmx file -- use an editor
    and edit the file?
    Tuesday, May 8, 2012 1:17 AM