|
|
|
@ -12,14 +12,15 @@ namespace CORRESPONSALBackend.Repository.Catalogos |
|
|
|
|
private readonly DapperContext _context; |
|
|
|
|
public TabuladorRepository(DapperContext context) { _context = context; } |
|
|
|
|
|
|
|
|
|
public async Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente) |
|
|
|
|
public async Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente, int? idCorresponsal) |
|
|
|
|
{ |
|
|
|
|
var query = "[Catalogo.Tabulador.Get]"; |
|
|
|
|
using var connection = _context.CreateConnection(); |
|
|
|
|
var entrada = await connection.QueryAsync<Tabulador>(query, new |
|
|
|
|
{ |
|
|
|
|
@id = id, |
|
|
|
|
@IdCliente = IdCliente |
|
|
|
|
@IdCliente = IdCliente, |
|
|
|
|
@IdCorresponsal = idCorresponsal |
|
|
|
|
}, |
|
|
|
|
commandType: CommandType.StoredProcedure); |
|
|
|
|
return entrada; |
|
|
|
@ -35,6 +36,7 @@ namespace CORRESPONSALBackend.Repository.Catalogos |
|
|
|
|
data.id, |
|
|
|
|
data.Nombre, |
|
|
|
|
data.IdCliente, |
|
|
|
|
data.IdCorresponsal |
|
|
|
|
}, |
|
|
|
|
commandType: CommandType.StoredProcedure); |
|
|
|
|
return entrada.First(); |
|
|
|
|