none
Entity Framework Error. RRS feed

  • Question

  • Hi,

    I'm not able to figure out which entity is giving me this error. Can you please help me with this.

    "Two entities with possibly different keys are mapped to the same row. Ensure these two mapping fragments map both ends of the AssociationSet to the corresponding columns."

    Thursday, May 19, 2016 10:13 AM

All replies

  • please post your error message and the entity definition and the DbContext then I can help you.
    Thursday, May 19, 2016 10:48 AM
  • Hi Harshul Antriwale,

    >>"Two entities with possibly different keys are mapped to the same row. Ensure these two mapping fragments map both ends of the AssociationSet to the corresponding columns."

    Based on your error message, I'm not sure what cause the issue, could you please provide related code (or simple demo which reproduce the issue) to us, it's helpful to solve your issue.

    In addition, you search for website with error message by your favorite search tool.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 27, 2016 9:24 AM
    Moderator
  • Are you generating your Entities from your database?

    If you are then delete the edmx from your project and regenerate it again from the database.

    chanmm


    chanmm

    Sunday, May 29, 2016 6:28 AM