using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace AsbCloudWebApi.Tests
{
    public interface IRepositoryFactory<TDto>
    {
        Task<int> DeleteAsync(int id, CancellationToken token);
        Task<IEnumerable<TDto>> GetAllAsync(CancellationToken token);
        TDto? GetOrDefault(int id);
        Task<TDto?> GetOrDefaultAsync(int id, CancellationToken token);
        Task<int> InsertAsync(TDto newItem, CancellationToken token);
        Task<int> InsertRangeAsync(IEnumerable<TDto> newItems, CancellationToken token);
        Task<int> UpdateAsync(TDto item, CancellationToken token);
    }
}