public User CreateNewUser(string firstName, string lastName, string password) { if (_context.UsersName.Contains(User.GetUserFullName(firstName, lastName))) { throw new InvalidOperationException("User alredy exist"); } User user = new User(firstName, lastName, password); UserHasBeenCreated?.Invoke(user, EventArgs.Empty); SaveUser(user); _currentUser = user; return(user); }
public void Apply(UserHasBeenCreated e) { if (e.Succeeded) { } }