public static async Task ProcessPendingBlockSyncRequests() { var builder = Builders <Models.BlockSyncRequest> .Filter; var filter = builder.Where(x => !x.Processed); IEnumerable <BlockSyncRequest> blockSyncRequests; using (var _blockSyncRequestRepository = new MongoRepository <BlockSyncRequest>()) { blockSyncRequests = await _blockSyncRequestRepository.FindAsync(filter, null); } var synchronizationService = new SynchronizationService(); await synchronizationService.SynchronizeNewBlocksAsync(blockSyncRequests.ToList()); }