Files
mapo-core/MP.Data/Services/Utils/IStatsAggrService.cs
T
Samuele Locatelli 45cb6b9f59 Fix integrazione preliminare servizi utils.stats x IOC:
- aggiunta migrations
- correzioni versione ef6 da ef8
- correzioni init varie
2026-04-07 10:30:04 +02:00

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.Services.Utils
{
public interface IStatsAggrService
{
#region Public Methods
/// <summary>
/// Recupera l'elenco delle statistiche aggregate per un periodo specificato.
/// Utilizza la cache automaticamente.
/// </summary>
/// <param name="dtStart">Data inizio periodo</param>
/// <param name="dtEnd">Data fine periodo</param>
Task<List<StatsAggregatedModel>> GetFiltAsync(DateTime dtStart, DateTime dtEnd);
/// <summary>
/// Recupera il range di periodi valido per le chiamate aggregate.
/// Utilizza la cache automaticamente.
/// </summary>
Task<DtUtils.Periodo> GetRangeAsync();
/// <summary>
/// Inserisce o aggiorna in batch le statistiche aggregate nel database.
/// Opzionalmente elimina i record precedenti nel periodo specificato.
/// </summary>
/// <param name="listRecords">Elenco dei record da inserire/aggiornare</param>
/// <param name="removeOld">Se true elimina preventivamente i record nel periodo richiesto</param>
Task<int> UpsertManyAsync(List<StatsAggregatedModel> listRecords, bool removeOld);
#endregion Public Methods
}
}