This question is locked. New answers and comments are not allowed.
Hello,
I'm converting my project over to silverlight 5 with OData 3. Do you have any examples of how to handle errors being returned by the context via the WCF service. I see you have an example in your documentation for WCF Ria but not Odata. I'm probably missing something but I am trying to capture the error in a try catch block in the lambda being submitted on the background thread but I am not getting any specifics about the error.
I'm converting my project over to silverlight 5 with OData 3. Do you have any examples of how to handle errors being returned by the context via the WCF service. I see you have an example in your documentation for WCF Ria but not Odata. I'm probably missing something but I am trying to capture the error in a try catch block in the lambda being submitted on the background thread but I am not getting any specifics about the error.
Dim
myData
As
AspireWebWcfDataService.MyContext = ContextFactory.ObtainContext
Dim
newApp
As
New
AspireWebWcfDataService.Application
With
newApp
.ApplicationType = myNewWindow.NewProjectType
'.ID = Guid.NewGuid
.ProjectName = myNewWindow.NewApplicationName
.RegionId = myNewWindow.NewRegion
.IsArchived =
False
.LastUpdDate =
Date
.UtcNow
'Add Submission Unit
Dim
newSubUnit
As
New
AspireWebWcfDataService.SubmissionUnit
newSubUnit.StartingPriority = 0
'newSubUnit.ID = Guid.NewGuid
newSubUnit.Name =
"Original Submission"
newSubUnit.CreateDate = System.DateTime.UtcNow
newSubUnit.Type =
"original"
newSubUnit.FilingType = defaultFilingType
newSubUnit.Status =
"ssinprocess"
newSubUnit.IntegrityCheckAlgorithm = defaultIntegrityType
newSubUnit.LastUpdDate =
Date
.UtcNow
.SubmissionUnits.Add(newSubUnit)
myData.AddObject(
"Application"
, newApp)
'myData.AddRelatedObject(newApp, "SubmissionUnits", newSubUnit)
myData.BeginSaveChanges(
Sub
(c)
Try
TryCast(c.AsyncState, AspireWebWcfDataService.MyContext).EndSaveChanges(c)
Catch
ex
As
Exception
System.Diagnostics.Debug.WriteLine(ex.Message)
End
Try
End
Sub
, myData)
End
With