コード例 #1
0
        public void Handle(BalanceChangedEvent domainEvent)
        {
            var repository = new HeadOfficeRepository();
            var headOffice = HeadOfficeInstance.Instance;

            headOffice.ChangeBalance(domainEvent.Delta);
            repository.Save(headOffice);
        }
コード例 #2
0
        public static void Init()
        {
            var repository = new HeadOfficeRepository();

            Instance = repository.GetById(HeadOfficeId);
        }