1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-24 23:25:37 +01:00
GiantsTools/Giants.Services/Store/CosmosDbVersioningStore.cs
2022-09-08 22:31:24 -07:00

27 lines
660 B
C#

namespace Giants.Services.Store
{
using System.Collections.Generic;
using System.Threading.Tasks;
public class CosmosDbVersioningStore : IVersioningStore
{
private readonly CosmosDbClient client;
public CosmosDbVersioningStore(
CosmosDbClient cosmosDbClient)
{
this.client = cosmosDbClient;
}
public Task<IEnumerable<VersionInfo>> GetVersions()
{
return this.client.GetItems<VersionInfo>();
}
public async Task UpdateVersionInfo(VersionInfo versionInfo)
{
await this.client.UpsertItem(versionInfo);
}
}
}