1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-23 14:45:37 +01:00
GiantsTools/Giants.Services/Store/CosmosDbVersioningStore.cs

27 lines
660 B
C#
Raw Normal View History

namespace Giants.Services.Store
{
2022-09-09 07:31:24 +02:00
using System.Collections.Generic;
using System.Threading.Tasks;
2022-09-05 22:42:41 +02:00
public class CosmosDbVersioningStore : IVersioningStore
{
2022-09-09 07:31:24 +02:00
private readonly CosmosDbClient client;
2022-09-05 22:42:41 +02:00
public CosmosDbVersioningStore(
2022-09-09 07:31:24 +02:00
CosmosDbClient cosmosDbClient)
{
2022-09-09 07:31:24 +02:00
this.client = cosmosDbClient;
}
2022-09-09 07:31:24 +02:00
public Task<IEnumerable<VersionInfo>> GetVersions()
{
2022-09-09 07:31:24 +02:00
return this.client.GetItems<VersionInfo>();
}
2022-09-05 22:42:41 +02:00
public async Task UpdateVersionInfo(VersionInfo versionInfo)
{
await this.client.UpsertItem(versionInfo);
}
}
}