using System;
using System.Collections.Generic;
using System.Linq;
using Ultimus.Utilitarios;
using ULA.Cathay.CreditoModel.Credito;
namespace ULA.Cathay.CreditoModel.DAL.Credito
{
public class CondicionesGeneralesCreditoDAL
{
UltimusLogs logs = new UltimusLogs("CondicionesGeneralesCreditoDAL");
///
///
///
///
public ICollection Obtener(int? IdTipoCondicion = null)
{
ICollection _model = null;
try
{
using (CreditoContex db = new CreditoContex())
_model = db.CondicionesGeneralesCredito
.Where(x => ( ((IdTipoCondicion == null) || (x.IdTipoCondicion == IdTipoCondicion)) && x.Habilitado ) ).ToList();
}
catch (Exception ex)
{
logs.Error(ex);
throw ex;
}
return _model;
}
}
}