2022-05-22 21:18:43 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using AsbCloudApp.Services;
|
|
|
|
|
using AsbCloudDb.Model;
|
|
|
|
|
using AsbCloudInfrastructure.Services.Cache;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services
|
|
|
|
|
{
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public class DrillerService : CrudServiceBase<DrillerDto, Driller>, IDrillerService
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public DrillerService(IAsbCloudDbContext context) : base(context)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public async Task<int> DeleteAsync(int id, CancellationToken dto)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
2022-05-25 20:19:08 +05:00
|
|
|
|
return await base.DeleteAsync(id, dto);
|
2022-05-22 21:18:43 +05:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public async Task<IEnumerable<DrillerDto>> GetAllAsync(CancellationToken token)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
|
|
|
|
return await base.GetAllAsync(token);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public async Task<DrillerDto> GetAsync(int id, CancellationToken token)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
2022-05-25 20:19:08 +05:00
|
|
|
|
return await base.GetAsync(id,token)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public async Task<int> InsertAsync(DrillerDto dto, CancellationToken token)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
2022-05-25 20:19:08 +05:00
|
|
|
|
return await base.InsertAsync(dto, token);
|
2022-05-22 21:18:43 +05:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-25 20:19:08 +05:00
|
|
|
|
public async Task<int> UpdateAsync(int id, DrillerDto dto, CancellationToken token)
|
2022-05-22 21:18:43 +05:00
|
|
|
|
{
|
2022-05-25 20:19:08 +05:00
|
|
|
|
return await base.UpdateAsync(id,dto, token);
|
2022-05-22 21:18:43 +05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|