mirror of
https://github.com/bitwarden/server
synced 2025-12-20 18:23:44 +00:00
event write services
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user