persistence/Persistence/API/ITimeSeriesDataApi.cs
Olga Nemt 828864c112 Тестовые проект(ы) для реализации интерфейсов Persistence:
- Persistence.API
- Persistence.Database
- Persistence.Repository
- Persistence.IntegrationTests
2024-11-14 15:17:43 +05:00

43 lines
1.4 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 Microsoft.AspNetCore.Mvc;
using Persistence.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Persistence.API;
/// <summary>
/// Интерфейс для работы с API временных данных
/// </summary>
public interface ITimeSeriesDataApi<TDto>
where TDto : class, ITimeSeriesAbstractDto, new()
{
/// <summary>
/// Получить список объектов, удовлетворяющий диапазон дат
/// </summary>
/// <param name="dateBegin">дата начала</param>
/// <param name="dateEnd">дата окончания</param>
/// <param name="token"></param>
/// <returns></returns>
Task<IActionResult> GetAsync(DateTimeOffset dateBegin, DateTimeOffset dateEnd, CancellationToken token);
/// <summary>
/// Получить диапазон дат, для которых есть данные в репозитории
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
Task<IActionResult> GetDatesRangeAsync(CancellationToken token);
/// <summary>
/// Добавление записей
/// </summary>
/// <param name="dtos"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<IActionResult> InsertRangeAsync(IEnumerable<TDto> dtos, CancellationToken token);
}