forked from ddrilling/AsbCloudServer
40 lines
1.6 KiB
C#
40 lines
1.6 KiB
C#
using AsbCloudApp.Data;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace AsbCloudApp.Services
|
||
{
|
||
/// <summary>
|
||
/// Репозиторий получения, добавления, изменения, удаления данных<br/>
|
||
/// Для сущностей относящихся к скважине
|
||
/// </summary>
|
||
/// <typeparam name="Tdto"></typeparam>
|
||
public interface IRepositoryWellRelated<Tdto> : ICrudRepository<Tdto>
|
||
where Tdto : IId, IWellRelated
|
||
{
|
||
/// <summary>
|
||
/// Получение всех записей по скважине
|
||
/// </summary>
|
||
/// <param name="idWell">id скважины</param>
|
||
/// <param name="token"></param>
|
||
/// <returns>emptyList if nothing found</returns>
|
||
Task<IEnumerable<Tdto>> GetByIdWellAsync(int idWell, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Удалить записи связанных со скважиной
|
||
/// </summary>
|
||
/// <param name="idWell"></param>
|
||
/// <param name="cancellationToken"></param>
|
||
/// <returns></returns>
|
||
Task<int> RemoveByWellAsync(int idWell, CancellationToken cancellationToken);
|
||
|
||
/// <summary>
|
||
/// Получение всех записей по нескольким скважинам
|
||
/// </summary>
|
||
/// <param name="idsWells">id скважин</param>
|
||
/// <param name="token"></param>
|
||
/// <returns>emptyList if nothing found</returns>
|
||
Task<IEnumerable<Tdto>> GetByIdWellAsync(IEnumerable<int> idsWells, CancellationToken token);
|
||
}
|
||
} |