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); }
public bool isUserInRole(string NombreUsuario, string NombreRol) { bool result = false; using (context = new BDContext()) { result = (bool)context.sp_isUserInRole(NombreUsuario, NombreRol).First(); } return(result); }
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); }