1
0
mirror of https://github.com/bitwarden/server synced 2026-01-05 18:13:31 +00:00

use EventTableEntity instead of TableEntity

This commit is contained in:
Kyle Spearrin
2017-12-08 14:03:07 -05:00
parent f898b92f87
commit c01fd359f0
14 changed files with 34 additions and 35 deletions

View File

@@ -2,14 +2,13 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Bit.Core.Models.Data;
using Microsoft.WindowsAzure.Storage.Table;
namespace Bit.Core.Repositories
{
public interface IEventRepository
{
Task<ICollection<EventTableEntity>> GetManyByUserAsync(Guid userId, DateTime startDate, DateTime endDate);
Task CreateAsync(ITableEntity entity);
Task CreateManyAsync(IList<ITableEntity> entities);
Task CreateAsync(EventTableEntity entity);
Task CreateManyAsync(IList<EventTableEntity> entities);
}
}

View File

@@ -49,12 +49,12 @@ namespace Bit.Core.Repositories.TableStorage
return results;
}
public async Task CreateAsync(ITableEntity entity)
public async Task CreateAsync(EventTableEntity entity)
{
await Table.ExecuteAsync(TableOperation.Insert(entity));
}
public async Task CreateManyAsync(IList<ITableEntity> entities)
public async Task CreateManyAsync(IList<EventTableEntity> entities)
{
if(!entities?.Any() ?? true)
{