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.