mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-24 23:25:37 +01:00
27 lines
660 B
C#
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);
|
|
}
|
|
}
|
|
}
|