DD.WellWorkover.Cloud/AsbCloudWebApi.Tests/IRepositoryFactory.cs

17 lines
652 B
C#
Raw Normal View History

2022-10-05 15:47:02 +05:00
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);
}
}