Пример #1
0
        private async Task HandleAsync(LoadGiftcard command)
        {
            var giftcard = await this.Repository
                           .GetByIdAsync <Giftcard>(command.CardId)
                           .ConfigureAwait(false);

            giftcard.Load(command.Amount);

            await this.Repository.SaveAsync(giftcard).ConfigureAwait(false);
        }
Пример #2
0
        public async Task HandleAsync(LoadGiftcard message)
        {
            var giftcard = await this.repository
                           .GetByIdAsync <Giftcard>(message.CardId)
                           .ConfigureAwait(false);

            giftcard.Load(message.Amount);

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