Exemplo n.º 1
0
        /// <summary>
        /// Add user to role
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="roleName"></param>
        public void removeUserFromRole(string userName, string roleName)
        {
            var user = new ApplicationUser()
            {
                UserName = userName
            };

            var selectedUser = MyUserManager.FindByName(user.UserName);

            MyUserManager.RemoveFromRole(selectedUser.Id, roleName);
        }