コード例 #1
0
        public async Task UpsertBlockAsync(RPC.Eth.DTOs.Block source)
        {
            var record = await FindByBlockNumberAsync(source.Number).ConfigureAwait(false);

            if (record != null)
            {
                Records.Remove(record);
            }
            Records.Add(source.MapToStorageEntityForUpsert());
        }
コード例 #2
0
        public async Task UpsertBlockAsync(RPC.Eth.DTOs.Block source)
        {
            var block = source.MapToStorageEntityForUpsert <MongoDbBlock>();

            await UpsertDocumentAsync(block).ConfigureAwait(false);
        }