public override void Handle(BankEvents.Created message) { BankDto dto = this.Load(message.BankId); if (dto != null) throw new Exception("Item with the same Id already created!"); dto = new BankDto(); dto.BankId = message.BankId; this.Save(dto); }
public override void Handle(BankEvents.NoteChanged message) { BankDto dto = this.Load(message.BankId); dto.Note = message.Note; this.Save(dto); }
public override void Handle(BankEvents.BankSwiftCodeChanged message) { BankDto dto = this.Load(message.BankId); dto.SwiftCode = message.SwiftCode; this.Save(dto); }
public override void Handle(BankEvents.CountryChanged message) { BankDto dto = this.Load(message.BankId); dto.CountryId = message.CountryId; this.Save(dto); }
public void When(BankEvents.NoteChanged e) { this.Note = e.Note; }
public void When(BankEvents.BankSwiftCodeChanged e) { this.SwiftCode = e.SwiftCode; }
public void When(BankEvents.BankCodeChanged e) { this.Code = e.Code; }
public void When(BankEvents.NameChanged e) { this.Name = e.Name; }
public void When(BankEvents.CountryChanged e) { this.CountryId = e.CountryId; }
public void When(BankEvents.Created e) { this.BankId = e.BankId; }