Beispiel #1
0
        private async Task HandleAsync(ActivateGiftcard command)
        {
            var giftcard = await this.Repository
                           .GetByIdAsync <Giftcard>(command.CardId)
                           .ConfigureAwait(false);

            giftcard.Activate();

            await this.Repository.SaveAsync(giftcard).ConfigureAwait(false);
        }
Beispiel #2
0
        public async Task HandleAsync(ActivateGiftcard message)
        {
            var giftcard = await this.repository
                           .GetByIdAsync <Giftcard>(message.CardId)
                           .ConfigureAwait(false);

            giftcard.Activate();

            await this.repository.SaveAsync(giftcard).ConfigureAwait(false);
        }