45cb6b9f59
- aggiunta migrations - correzioni versione ef6 da ef8 - correzioni init varie
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.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
|
|
}
|
|
} |