Esempio n. 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);
        }
Esempio n. 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);
        }