1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 18:23:44 +00:00

event write services

This commit is contained in:
Kyle Spearrin
2017-12-04 09:58:07 -05:00
parent bcd8a06994
commit 8a88a36140
5 changed files with 101 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
using System.Threading.Tasks;
using Bit.Core.Repositories;
using System.Collections.Generic;
using Microsoft.WindowsAzure.Storage.Table;
namespace Bit.Core.Services
{
public class RepositoryEventWriteService : IEventWriteService
{
private readonly IEventRepository _eventRepository;
private readonly GlobalSettings _globalSettings;
public RepositoryEventWriteService(
IEventRepository eventRepository,
GlobalSettings globalSettings)
{
_eventRepository = eventRepository;
_globalSettings = globalSettings;
}
public async Task CreateAsync(ITableEntity entity)
{
await _eventRepository.CreateAsync(entity);
}
public async Task CreateManyAsync(IList<ITableEntity> entities)
{
await _eventRepository.CreateManyAsync(entities);
}
}
}