예제 #1
0
        public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
        {
            if (new UserDa(databasecontext).RoleExists(roleName))
            {
                var role = new UserDa(databasecontext);
                var currentRole = role.GetRole(roleName);
                role.DeleteRole(currentRole);

                return true;
            }
            else return false;
        }
예제 #2
0
 public void DeleteRole(int id)
 {
     var user = new UserDa(databasecontext);
     if (id > 0)
     {
         var currentRole = GetRoleById(id);
         user.DeleteRole(currentRole);
     }
 }