Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to update multiple tables in Entity Framework
each tables contains more than 30 columns

i am using below code its not work

C#
DBEntity_context = new DBEntity()
  _context.ConfiguredProducts.AttachAsModified<configuredproduct>(configuredProduct);


throws error referential contraint
solve as soon as.
Posted
Updated 14-May-14 23:16pm
v3
Comments
phil.o 15-May-14 5:15am    
Without knowing a mnimum about the schema involving the ConfiguredProducts table, as well as which table(s) are involved with it in a referential constraint, there is a quite small chance that anybody can help you with that.
Moreover, please post the exact error message, alongside with stack trace so that it is easier to figure out what's happening and where (despite I suspect your problem is that the configuredProduct references a primary key in another table that you did not insert yet).
If you want the quickest and most accurate answer, you have to provide details, but not, in any way, to urge us with an ASAP notification.
Member 10458902 15-May-14 6:34am    
sorry the error
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.
ConfiguredProducts relation with number of tables

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900