public IObservable <ITransition> Start() => getOldestUnsynced() .SingleAsync() .Select(entity => entity != null ? (ITransition)ChangeFound.Transition(entity) : NoMoreChanges.Transition());
public IObservable <ITransition> Start() => dataSource .Get() .Where(entity => entity.SyncStatus == SyncStatus.SyncNeeded) .SingleOrDefaultAsync() .Select(entity => entity != null ? (ITransition)ChangeFound.Transition(entity) : NoMoreChanges.Transition());