Exemplo n.º 1
0
        public List <PermisoBase> Listar()
        {
            try
            {
                List <PermisoBase> _lista = new List <PermisoBase>();

                foreach (PermisoBase i in _mapeador.Listar())
                {
                    _lista.Add(i);
                }

                return(_lista);
            }
            catch (Exception ex)
            {
                // REGISTRAR EN BITACORA
                // Lanzar Exception  personalizada
                throw new Exception("Error al listar permisos");
            }
        }
Exemplo n.º 2
0
        public List <Permiso> Listar()
        {
            List <Permiso> result = null;

            try
            {
                PermisoDAL model    = new PermisoDAL(_connectionString);
                var        permisos = model.Listar();

                if (permisos != null)
                {
                    result = Converter.ConvertToBL(permisos);
                }
            }
            catch (Exception ex)
            {
                log.Error("Listar()", ex);
            }

            return(result);
        }