37 lines
1.4 KiB
C#
37 lines
1.4 KiB
C#
using EgwCoreLib.Utils;
|
|
using MP.Data.DbModels.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MP.Data.Repository.Utils
|
|
{
|
|
/// <summary>
|
|
/// Gestione statistiche errori
|
|
/// </summary>
|
|
public interface IStatsErrRepository
|
|
{
|
|
/// <summary>
|
|
/// Recupera l'elenco delle statistiche errori per un periodo specifico.
|
|
/// </summary>
|
|
/// <param name="dtStart">La data di inizio del periodo.</param>
|
|
/// <param name="dtEnd">La data di fine del periodo.</param>
|
|
/// <returns>L'elenco delle statistiche errori ordinate cronologicamente.</returns>
|
|
Task<List<StatsErrorModel>> GetFiltAsync(DateTime dtStart, DateTime dtEnd);
|
|
|
|
/// <summary>
|
|
/// Recupera l'intervallo temporale disponibile nel database per le statistiche errore.
|
|
/// </summary>
|
|
/// <returns>L'intervallo di date (minima e massima ora presente).</returns>
|
|
Task<DtUtils.Periodo> GetRangeAsync();
|
|
|
|
/// <summary>
|
|
/// Inserisce o aggiorna in blocco le statistiche errore nel database.
|
|
/// </summary>
|
|
/// <param name="listRecords">L'elenco dei record da inserire.</param>
|
|
/// <param name="removeOld">Se true, elimina preventivamente i record nel periodo richiesto.</param>
|
|
/// <returns>Il numero di record inseriti.</returns>
|
|
Task<int> UpsertManyAsync(List<StatsErrorModel> listRecords, bool removeOld);
|
|
}
|
|
}
|