示例#1
0
        public bool isUserInRole(string usuario, string nombreRol)
        {
            bool result = false;

            using (context = new BDContext())
            {
                result = (bool)context.sp_isUserInRole(usuario, nombreRol).First();
                //  result  = (bool)context.sp_isUserInRole(userName, roleName).FirstOrDefault();
            }
            return(result);
        }
示例#2
0
        public bool isUserInRole(string NombreUsuario, string NombreRol)
        {
            bool result = false;

            using (context = new BDContext())
            {
                result = (bool)context.sp_isUserInRole(NombreUsuario, NombreRol).First();
            }

            return(result);
        }
示例#3
0
        public bool isUserInRole(string userName, string roleName)
        {
            bool result = false;

            using (context = new BDContext())
            {
                //result = context.sp_isUserInRole(userName, roleName) != 0;
                result = (bool)context.sp_isUserInRole(userName, roleName).FirstOrDefault();
            }
            return(result);
        }