public static int Add(User user) { user.Name = user.Email; User user2 = GetUser(user.Email); if (user2 != null) throw new Exception("There is another user has the same e-mail, please choose another e-mail"); return UserDataMapper.Add(user); }