简体   繁体   中英

relationship SQL C# with linq

I'm studying Linq, I have a table with a relationship between processos.idProcesso and ProcessosDetalhe.id_ProcessosDetalhe, but, when I try to add the informations in DataBase, I get one error:

错误

数据库

I tried to use the Add function, but, I can't use the add function in datacontex So, how I can solve that error ?? or, what I need to make in SQL to correct that error ?

添加错误数据上下文

The error mean that in your table ProcessosDetalhes, it has a foreign key reference to another table. The FK cannot have a value in that column that is not also in the primary key column of the referenced table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM