JamesNK / Newtonsoft.Json

Json.NET is a popular high-performance JSON framework for .NET
https://www.newtonsoft.com/json
MIT License
10.73k stars 3.25k forks source link

Update DataSetConverter.cs #2818

Open rgb4321 opened 1 year ago

rgb4321 commented 1 year ago

Typed datasets are serialized in whatever order tables were added (usually via the designer). If there is a foreign key constraint and the child table happened to be added by the developer prior to the parent table, deserialization could fail with an InvalidConstraintException. To avoid that, set EnforceConstraints to false prior to deserializing the dataset and then set it back to true when deserialization is complete.