public void Rename(string firstName, string lastName) { if (string.IsNullOrEmpty(firstName)) { throw new ArgumentException(nameof(firstName)); } if (string.IsNullOrEmpty(lastName)) { throw new ArgumentException(nameof(lastName)); } var evnt = new UserRenamed(state.Id, firstName, lastName); Apply(evnt); }
public void When(UserRenamed e) { Firstname = e.Firstname; Lastname = e.Lastname; }
public void Rename(string firstName, string lastName) { var evnt = new UserRenamed(state.Id, firstName, lastName); Apply(evnt); }