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; }
|
|
|
|
|
Task<int> InsertAsync(Tdto newItem, CancellationToken token = default);
|
|
|
|
|
Task<int> InsertRangeAsync(IEnumerable<Tdto> newItems, CancellationToken token = default);
|
2021-12-03 15:03:33 +05:00
|
|
|
|
Task<IEnumerable<Tdto>> GetAllAsync(CancellationToken token = default);
|
|
|
|
|
Task<Tdto> GetAsync(int id, CancellationToken token = default);
|
2021-09-10 11:28:57 +05:00
|
|
|
|
Task<int> UpdateAsync(int id, Tdto item, CancellationToken token = default);
|
2021-12-03 15:03:33 +05:00
|
|
|
|
Task<int> DeleteAsync(int id, CancellationToken token = default);
|
|
|
|
|
Task<int> DeleteAsync(IEnumerable<int> ids, CancellationToken token = default);
|
2021-08-02 14:45:13 +05:00
|
|
|
|
}
|
|
|
|
|
}
|