示例#1
0
 public void Apply(NameChanged changeName)
 {
     Console.WriteLine("Applying name: " + changeName.NewName);
     Name = changeName.NewName;
 }
示例#2
0
 public void ChangeName(string newName)
 {
     var nameChanged = new NameChanged(Id, newName);
     Apply(nameChanged);
     StoreEvent(nameChanged);
 }