Aggiunta modello dati statistiche e reposiitory/service per implementarli (da validare)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using EgwCoreLib.Utils;
|
||||
|
||||
namespace MP.Data.Repository.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Interfaccia per le statistiche aggregate.
|
||||
/// </summary>
|
||||
public interface IStatsAggrRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Recupera l'elenco delle statistiche aggregate 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 aggregate ordinate cronologicamente.</returns>
|
||||
Task<List<StatsAggregatedModel>> GetFiltAsync(DateTime dtStart, DateTime dtEnd);
|
||||
|
||||
/// <summary>
|
||||
/// Recupera l'intervallo temporale disponibile nel database per le statistiche aggregate.
|
||||
/// </summary>
|
||||
/// <returns>L'intervallo di date (minima e massima ora presente).</returns>
|
||||
Task<DtUtils.Periodo> GetRangeAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Inserisce o aggiorna in blocco le statistiche aggregate 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<StatsAggregatedModel> listRecords, bool removeOld);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user