Example #1
0
 void RegisterFranchiseTaxId(string taxId)
 {
     if (string.IsNullOrEmpty(this.Entity.TaxId))
     {
         var @event = new FranchiseTaxIdRegistered(this.Entity.ID, taxId);
         this.Entity.Apply(@event);
     }
     else
     {
         throw new InvalidOperationException("Cannot change a businesses TaxId without change of ownership first.");
     }
 }
Example #2
0
 public void Apply(FranchiseTaxIdRegistered @event)
 {
     this.TaxId = @event.TaxId;
 }