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

17 lines
714 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-08-10 14:35:49 +05:00
Task<Tdto> GetAsync(int id, CancellationToken token = default);
Task<Tdto> InsertAsync(Tdto newItem, CancellationToken token = default);
Task<IEnumerable<Tdto>> InsertRangeAsync(IEnumerable<Tdto> newItems, CancellationToken token = default);
Task<Tdto> UpdateAsync(Tdto item, CancellationToken token = default);
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
}
}