21 lines
1.0 KiB
C#
21 lines
1.0 KiB
C#
using GestionIntegral.Api.Models.Distribucion;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using System.Data;
|
|
using GestionIntegral.Api.Dtos.Empresas; // Para IDbTransaction
|
|
|
|
namespace GestionIntegral.Api.Data.Repositories.Distribucion
|
|
{
|
|
public interface IEmpresaRepository
|
|
{
|
|
Task<IEnumerable<Empresa>> GetAllAsync(string? nombreFilter, string? detalleFilter);
|
|
Task<Empresa?> GetByIdAsync(int id);
|
|
Task<Empresa?> CreateAsync(Empresa nuevaEmpresa, int idUsuario, IDbTransaction transaction); // Necesita transacción
|
|
Task<bool> UpdateAsync(Empresa empresaAActualizar, int idUsuario, IDbTransaction transaction); // Necesita transacción
|
|
Task<bool> DeleteAsync(int id, int idUsuario, IDbTransaction transaction); // Necesita transacción
|
|
Task<bool> ExistsByNameAsync(string nombre, int? excludeId = null);
|
|
Task<bool> IsInUseAsync(int id);
|
|
Task<IEnumerable<EmpresaDropdownDto>> GetAllDropdownAsync();
|
|
Task<Empresa?> ObtenerLookupPorIdAsync(int id);
|
|
}
|
|
} |