Hi,
I hope that you can assist with a very urgent issue:
In some instances (but not all) our calls to SaveChangesAsync is not returning (ie: a breakpoint on the supplied callback is never hit). Under what conditions will this happen? The only changes that we have made (this was working last week) is a strategy for prepopulating the DevForce cache from the database and persisting the cache to/from a file on startup (so that reference data is not downloaded every time the application runs).
here is an example of where it is failing (Updated is successfully called and the call to SaveChangesAsync completed successfully but Finished is never called):
-----------------------------------------------------------------------------------------------------------------------------
private void Updated()
{
foreach (var parcel in this.Parcels)
{
var verifications = parcel.VerifierEngine.Execute(parcel);
this.ValidationResults.Clear();
if (!verifications.AreOk)
{
var errors = string.Empty;
foreach (var error in verifications.Errors)
{
errors += error.Description + Environment.NewLine;
}
MessageBox.Show(errors, "Could not Save", MessageBoxButton.OK);
return;
}
}
this.Shipment.Value.GenerateWaybillNumber();
this.Gateway.EntityManager.SaveChangesAsync(this.Finished,
null);
}
private void Finished(EntitySavedEventArgs args)
{
if (args.Error != null || args.Result == null ||
!args.Result.Ok)
{
throw new Exception("An error occurred while saving the
Shipment", args.Error);
}
else
{
DataNotificationService.UpdateShipments();
PopupWindowService.ClosePopUp();
}
}
-----------------------------------------------------------------------------------------------------------------------------