ADO.NET Data Services Bug...


Silverlight Logo

There is a bug in the current ADO.NET Data Services that ships with .NET 3.5 SP1 Beta 1.  The problem involves saving related data.  If the child object requires the relationship to the parent object, the update fails.

For example, if you have a Customer with a list of Orders.  The relationship between the Customers and Orders is 1...* (0 or 1...* doesn't cause this bug).  If you create a Customer and an Order to be updated with the ADO.NET Data Services client library at the same time, the current code attempts to save both the Customer and Order and then update the link between them separately.  Of course if the relationship really is 1...*, then you can't save an Order that doesn't have a customer so the update fails.  Unfortunately this can update the Customer and just ignore the error with the Order not saving. 

The only way to make this work is to relax the relationship so you can create the unrelated child object.

This is a bug in the server code and will be fixed in future builds of ADO.NET Data Services.

HTH



Shawn
Shawn Wildermuth
Author, Teacher, and Coach




My Courses

Wilder Minds Training
Vue.js by Example (New Lower Price)
Bootstrap 4 by Example (New Lower Price)
Intro to Font Awesome 5 (Free Course)
Pluralsight
Building an API with ASP.NET Core (New Course)
Building a Web App with ASP.NET Core, MVC6, EF Core, Bootstrap and Angular (updated for 2.2)
Less: Getting Started (New)
Using Visual Studio Code for ASP.NET Core Projects
Implementing ASP.NET Web API

Application Name WilderBlog Environment Name Production
Application Ver v4.0.30319 Runtime Framework x86
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 4.6.27817.01
Operating System Microsoft Windows 10.0.14393 Runtime Arch X86