DD.WellWorkover.Cloud/AsbCloudApp/Services/IRepositoryWellRelated.cs
2023-10-09 15:22:13 +05:00

40 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
}