コード例 #1
0
        async Task INotificationHandler <CostCodeUpdated> .Handle(CostCodeUpdated e, CancellationToken t)
        {
            var result =
                await db.CostCodes
                .SingleAsync(u => u.CostCodeExternalId == e.Id);

            result.CommonName       = e.CommonName;
            result.UniqueIdentifier = e.UniqueIdentifier;

            await db.SaveChangesAsync();
        }
コード例 #2
0
ファイル: CostCode.cs プロジェクト: neekgreen/incentives
 private void Apply(CostCodeUpdated e)
 {
     this.CommonName       = e.CommonName;
     this.UniqueIdentifier = e.UniqueIdentifier;
     this.IsActive         = e.IsActive;
 }