Economy fixture: keyed writes through UpsertAsync
This commit is contained in:
parent
263fa02a73
commit
91f9b5553c
1 changed files with 7 additions and 0 deletions
|
|
@ -143,3 +143,10 @@ public sealed class EconomyFixture : IDisposable
|
|||
return f;
|
||||
}
|
||||
}
|
||||
|
||||
internal static class EconomyUpserts
|
||||
{
|
||||
// A write under a readable key: the cache's own keyed write, completed synchronously.
|
||||
public static CultRecordKey Upsert(this CultCache cache, Type type, object document, CultRecordKey key) =>
|
||||
cache.UpsertAsync(type, document, key).GetAwaiter().GetResult();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue