Greetings all!
I'm trying to run a insert a bunch of data into postgresql using linq to sql but i'm getting a "foreign key restriction". And I can't figure out what's wrong because the exception code does not show me anything usefull (like, which row is bugging).
Is there a way for me to profile linq to sql execution, in order to see a little more about the error?
Thanks
Linq to SQL and PostgreSql Profiler
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
For example, you can check the SQL generated for your commands. For the detailed information about this, please refer to the 'Monitoring' topic of our documentation:
http://www.devart.com/linqconnect/docs/Monitoring.html
This error may occur, e.g., if a foreign key is nullable, whereas the corresponding property in the model is not. In this case, new rows may be inserted with default (e.g., zero instead of null) values in the foreign key columns, leading to the constraint violation.
http://www.devart.com/linqconnect/docs/Monitoring.html
This error may occur, e.g., if a foreign key is nullable, whereas the corresponding property in the model is not. In this case, new rows may be inserted with default (e.g., zero instead of null) values in the foreign key columns, leading to the constraint violation.