Exemple #1
0
        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);
        }
Exemple #2
0
 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);
        }