DD.WellWorkover.Cloud/AsbCloudApp/Services/ICrudService.cs

20 lines
948 B
C#
Raw Normal View History

2021-08-10 14:35:49 +05:00
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
2021-08-02 14:45:13 +05:00
namespace AsbCloudApp.Services
{
public interface ICrudService<Tdto>
where Tdto : Data.IId
{
2021-09-10 11:28:57 +05:00
List<string> Incledes { get; }
2021-08-10 14:35:49 +05:00
Task<int> DeleteAsync(int id, CancellationToken token = default);
Task<int> DeleteAsync(IEnumerable<int> ids, CancellationToken token = default);
2021-09-10 11:28:57 +05:00
Task<IEnumerable<Tdto>> GetAllAsync(CancellationToken token = default);
Task<Tdto> GetAsync(int id, CancellationToken token = default);
Task<Data.PaginationContainer<Tdto>> GetPageAsync(int skip = 0, int take = 32, CancellationToken token = default);
Task<int> InsertAsync(Tdto newItem, CancellationToken token = default);
Task<int> InsertRangeAsync(IEnumerable<Tdto> newItems, CancellationToken token = default);
Task<int> UpdateAsync(int id, Tdto item, CancellationToken token = default);
2021-08-02 14:45:13 +05:00
}
}