none
referential integrity constraint violation occurred RRS feed

  • Question

  • A referential integrity constraint violation occurred: The property values that define the referential constraints are not consistent between principal and dependent objects in the relationship.

    I am using Entity framework 5.0 dbcontext with database first

    When I add new SalesOrder it works fine but when edit existing Salesorder i get  referential integrity constraint violation even though i dont change anything. 




    Thanks & Regards, Vinay Suryawomshi

    Sunday, November 18, 2012 6:02 AM

Answers

  • Got it working, my mistake i was Assigning value to navigation property


    Thanks & Regards, Vinay Suryawomshi

    Sunday, November 18, 2012 9:08 AM

All replies

  • Got it working, my mistake i was Assigning value to navigation property


    Thanks & Regards, Vinay Suryawomshi

    Sunday, November 18, 2012 9:08 AM
  • Hi Vinay,

    Welcome to the MSDN forum.

    Glad to know your problem is solved by yourself. Thank you for sharing.

    Best Regards,


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

    Monday, November 19, 2012 1:43 AM