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 Obtener() { List respuesta = new List(); try { using (CreditoContex db = new CreditoContex()) { respuesta = db.Ley8262.ToList(); } } catch (Exception ex) { logger.Error(ex); throw ex; } return respuesta; } } }