Search code examples
.netstrongly-typed-dataset

Disable referential integrity in .NET typed dataset?


I have a large typed dataset which I want to partially fill for unit testing, however the dataset has sprawling referential integrity, meaning I can't just populate the small areas of data relevant to the test.

Unless there is some way to switch of referential integrity?


Solution

  • Yes, you can disable referential integrity in typed datasets.

    Set the property `EnforceConstraints' to false.