public void Handle(RenamePerson c) { // Do nothing. Umbrella Corporation does not permit renaming any person in their tenant account. // Throw an exception to make the consequences more severe for any attempt to rename a person... // throw new DisallowRenamePersonException(); }
public void Handle(RenamePerson c) { var aggregate = _repository.Get <PersonAggregate>(c.AggregateIdentifier); aggregate.RenamePerson(c.FirstName, c.LastName); Commit(aggregate); }