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()); }
public async Task UpsertBlockAsync(RPC.Eth.DTOs.Block source) { var block = source.MapToStorageEntityForUpsert <MongoDbBlock>(); await UpsertDocumentAsync(block).ConfigureAwait(false); }