48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
namespace EgwCoreLib.Lux.Data.Repository.Sales
|
|
{
|
|
/// <summary>
|
|
/// Interfaccia per la gestione dei clienti.
|
|
/// </summary>
|
|
public interface ICustomerRepository
|
|
{
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// Inserisce un nuovo record Customer nel database.
|
|
/// </summary>
|
|
/// <param name="entity">Record da inserire</param>
|
|
Task<bool> AddAsync(CustomerModel entity);
|
|
|
|
/// <summary>
|
|
/// Conta il numero di righe child (ordini, offerte) associate a un Customer specifico.
|
|
/// </summary>
|
|
/// <param name="CustomerID">ID del Template</param>
|
|
Task<int> CountChildrenAsync(int CustomerID);
|
|
|
|
/// <summary>
|
|
/// Elimina un record Customer dal database.
|
|
/// </summary>
|
|
/// <param name="entity">Record da eliminare</param>
|
|
Task<bool> DeleteAsync(CustomerModel entity);
|
|
|
|
/// <summary>
|
|
/// Recupera l'elenco di tutti i clienti.
|
|
/// </summary>
|
|
/// <returns>L'elenco di tutti i clienti.</returns>
|
|
Task<List<CustomerModel>> GetAllAsync();
|
|
|
|
/// <summary>
|
|
/// Recupera un Customer specifico per ID.
|
|
/// </summary>
|
|
/// <param name="CustomerID">ID del Customer da recuperare</param>
|
|
Task<CustomerModel?> GetByIdAsync(int CustomerID);
|
|
|
|
/// <summary>
|
|
/// Aggiorna un record Template esistente nel database.
|
|
/// </summary>
|
|
/// <param name="entity">Record aggiornato</param>
|
|
Task<bool> UpdateAsync(CustomerModel entity);
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |