c# - Not able to Delete a Entries from Database in mvc4 -


i trying delete record database specific row m not able it.

this linq query delete it

 formsubmit formsubmit = db.formsubmits.find(id);                 db.formsubmits.remove(formsubmit);                 db.savechanges(); 

and getting error this

enter image description here

i know because of foreign key how solve it.in sql use no check not getting in linq query.

not expert on this, this seems solution in case:

specify updatecheck = updatecheck.never on column in entity. disable update check , fix issue.

another option set cascade deletion on table in database.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

How to provide Authorization & Authentication using Asp.net, C#? -