Sprague
Sprague

Reputation: 1638

Debugging Silverlight RIA Services SubmitChanges

I'm having huge difficulty debugging database operations from Silverlight RIA. This is understandable, I suppose, since database operations are abstracted by about 3 layers of services and ORM and stuff, but is there any way I can see what the database is telling me regarding the issue? I'm able to find an EntityConflict object which doesn't offer much information.

The only field which seems to indicate any problem is "IsDeleted" property equal to true, however this property is not well documented at MSDN and I cannot even be sure that having it be true is an issue.

I've attempted to use fiddler, however no errors are reaching that, I've attached to the application's unhadled exception, but that points me back to EntityConflict, which I am recovering through handling SubmittedChanges event and accessing the args. I've even enabled WCF tracing to attempt to recover some information but, of course, nothing there either.

Upvotes: 0

Views: 1349

Answers (2)

Mathew
Mathew

Reputation: 41

Did you inspect SubmitOperation.Error after the submit operation failed? It should contain the error information you seek. More information on error handling can be found here: Link

Upvotes: 1

Sprague
Sprague

Reputation: 1638

The issue was a known issue, at least a few years ago, where INSTEAD OF INSERT doesn't return Scope_identity for a column inserted by this method. EF uses this value to verify that an insert was completed. When it fails, you get a deletion conflict. This is, apparently, a known issue with the SQL Server EF provider, however I have been unable to confirm that it's been resolved.

Upvotes: 0

Related Questions