using System.Linq.Expressions;
using salesbook.Shared.Core.Dto;
using salesbook.Shared.Core.Entity;

namespace salesbook.Shared.Core.Interface;

public interface IManageDataService
{
    Task<List<T>> GetTable<T>(Expression<Func<T, bool>>? whereCond = null) where T : new();
    
    Task<List<ActivityDTO>> GetActivity(Expression<Func<StbActivity, bool>>? whereCond = null);
    Task<List<ContactDTO>> GetContact();
    Task<ContactDTO?> GetSpecificContact(string codAnag, bool IsContact);

    Task InsertOrUpdate<T>(T objectToSave);
    Task InsertOrUpdate<T>(List<T> listToSave);

    Task Delete<T>(T objectToDelete);
    Task DeleteActivity(ActivityDTO activity);

    Task ClearDb();
}