using LSFE.Infrastructure.Model;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace LSFE.Domain.Contracts.Maintenance
{
    public interface IMaintenanceRepo<TEntity> where TEntity : class
    {
        Task<List<TEntity>> GetAllAsync(params Expression<Func<TEntity, object>>[] includeProperties);
        Task<TEntity?> GetByIdAsync(object id);
        Task<TEntity?> FindAsync(Expression<Func<TEntity, bool>> predicate);
        Task<bool> AnyAsync(Expression<Func<TEntity, bool>> predicate);
        IQueryable<TEntity> Query();
        Task<IEnumerable<TEntity>> FindAllAsync(Expression<Func<TEntity, bool>> predicate);
        Task AddRangeAsync(IEnumerable<TEntity> entities);
        Task<Response> AddOrUpdateAsync(TEntity entity);
        Task<Response> SoftDeleteAsync(int id);
        Task<Response> DeleteAsync(Guid id);
    }
}
