2022-06-29 19:46:41 -04:00
|
|
|
|
using Bit.Core.Models.Data;
|
2017-12-04 09:58:07 -05:00
|
|
|
|
using Bit.Core.Repositories;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Services;
|
2022-08-29 14:53:16 -04:00
|
|
|
|
|
2017-12-04 09:58:07 -05:00
|
|
|
|
public class RepositoryEventWriteService : IEventWriteService
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly IEventRepository _eventRepository;
|
|
|
|
|
|
|
|
|
|
|
|
public RepositoryEventWriteService(
|
2017-12-08 16:03:20 -05:00
|
|
|
|
IEventRepository eventRepository)
|
2017-12-04 09:58:07 -05:00
|
|
|
|
{
|
|
|
|
|
|
_eventRepository = eventRepository;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-12-08 23:09:50 -05:00
|
|
|
|
public async Task CreateAsync(IEvent e)
|
2017-12-04 09:58:07 -05:00
|
|
|
|
{
|
2017-12-08 23:09:50 -05:00
|
|
|
|
await _eventRepository.CreateAsync(e);
|
2017-12-04 09:58:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-05-17 09:43:02 -05:00
|
|
|
|
public async Task CreateManyAsync(IEnumerable<IEvent> e)
|
2017-12-04 09:58:07 -05:00
|
|
|
|
{
|
2017-12-08 23:09:50 -05:00
|
|
|
|
await _eventRepository.CreateManyAsync(e);
|
2017-12-04 09:58:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|