예제 #1
0
 /// <summary>
 /// AddUserToRole - add user to the role
 /// </summary>
 /// <param name="userId">Input User ID</param>
 /// <param name="roleName">Input Role Name</param>
 public void AddUserToRole(int userId, string roleName)
 {
     AddUserToRole(userId, _roleProvider.GetRoleBy(roleName).Id);
 }
 /// <summary>
 /// Get user role of a specific user name
 /// </summary>
 /// <param name="name">user name</param>
 /// <returns>Role, of that user name</returns>
 public Role GetByName(string name)
 {
     return(_roleProvider.GetRoleBy(name));
 }