Exemple #1
0
        async Task INotificationHandler <LedgerAccountUpdated> .Handle(LedgerAccountUpdated e, CancellationToken t)
        {
            var result =
                await db.LedgerAccounts
                .SingleAsync(u => u.LedgerAccountExternalId == e.Id);

            result.CommonName    = e.CommonName;
            result.AccountNumber = e.AccountNumber;
            result.IsActive      = e.IsActive;

            await db.SaveChangesAsync();
        }
 private void Apply(LedgerAccountUpdated e)
 {
     this.CommonName    = e.CommonName;
     this.AccountNumber = e.AccountNumber;
     this.IsActive      = e.IsActive;
 }