Is that supported? This is code I have (what I found in documentation) but seems like I can't get parameter out. Right? What choices do I have?
public INotifyCompleted GetNextTripNumber(Action<int> onSuccess = null, Action<Exception> onFail = null)
{
int? nextTripNumber = 0;
var query = this.EntityManager.SYSGetNextNumberQuery("MobileTrip", nextTripNumber);
var entityQueryOperation = this.EntityManager.ExecuteQueryAsync(query);
entityQueryOperation.Completed += (s, args) =>
{
if (args.CompletedSuccessfully)
{
onSuccess(nextTripNumber.Value);
}
else
{
args.MarkErrorAsHandled();
onFail(args.Error);
}
};
return entityQueryOperation;
}
Edited by katit - 17-Jan-2012 at 6:58pm