public static void Update(Role role) { Role role2 = GetRole(role.Name); if (role2 != null && role2.ID != role.ID) throw new Exception("There is another role has the same Name, please choose another Name"); RoleDataMapper.Update(role); }