48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using ULA.Cathay.CreditoModel.Credito;
|
|
using Ultimus.Utilitarios;
|
|
|
|
namespace ULA.Cathay.CreditoModel.DAL.Credito
|
|
{
|
|
public class Ley8262DAL
|
|
{
|
|
private UltimusLogs logger = new UltimusLogs("Ley8262DAL");
|
|
public Ley8262 Obtener(int IdLey8262)
|
|
{
|
|
Ley8262 respuesta = new Ley8262();
|
|
try
|
|
{
|
|
using (CreditoContex db = new CreditoContex())
|
|
{
|
|
respuesta = db.Ley8262.Where(x => x.IdLey8262 == IdLey8262).FirstOrDefault();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
logger.Error(ex);
|
|
throw ex;
|
|
}
|
|
return respuesta;
|
|
}
|
|
|
|
public List<Ley8262> Obtener()
|
|
{
|
|
List<Ley8262> respuesta = new List<Ley8262>();
|
|
try
|
|
{
|
|
using (CreditoContex db = new CreditoContex())
|
|
{
|
|
respuesta = db.Ley8262.ToList();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
logger.Error(ex);
|
|
throw ex;
|
|
}
|
|
return respuesta;
|
|
}
|
|
}
|
|
}
|