18 lines
		
	
	
		
			887 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			887 B
		
	
	
	
		
			C#
		
	
	
	
	
	
|  | using GestionIntegral.Api.Models.Distribucion; | ||
|  | using System.Collections.Generic; | ||
|  | using System.Threading.Tasks; | ||
|  | using System.Data; // 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); | ||
|  |     } | ||
|  | } |