protected override async Task <AsciiMaxStringReference> AssignUpsertedReferences(AsciiMaxStringReference record) => (await _hash.UpsertComputedHash(record)) as AsciiMaxStringReference;
protected override Expression <Func <AsciiMaxStringReference, bool> > FindExisting(AsciiMaxStringReference record) => existing => existing.Hash == record.Hash;
protected override async Task <AsciiMaxStringReference> AssignUpsertedReferences(AsciiMaxStringReference record) { var bytes = new xxHash(64).ComputeHash(Encoding.UTF8.GetBytes(record.Value)); var hash = new AsciiStringReference { Value = Convert.ToBase64String(bytes) }; hash = await _strings.UpsertAsync(hash); record.Hash = hash; record.HashId = hash.AsciiStringReferenceId; return(record); }