Good day,
I've migrated from 2010 to 2012 and some code doesn't work. All of them related to async.
So, I wonder if someone could be so kind to give me a hint here.
For example:
Here's what I was doing back in 2010:
public void GetCustomers(Action<IEnumerable<Customer>> onSuccess, Action<Exception> onFail) { Manager.Customers .Include(c => c.Address) .OrderBy(c => c.Id) .ExecuteAsync( op => { if (op.CompletedSuccessfully) { if (onSuccess != null) onSuccess(op.Results); } else { if (onFail != null) { op.MarkErrorAsHandled(); onFail(op.Error); } } } ); }
|
How should I convert it to 2012 in order to have this code working again?
Thanks in advance!