コード例 #1
0
        public async Task Handle(Events.BasketClaimed e, IMessageHandlerContext ctx)
        {
            var user = await ctx.UoW().Get <Identity.User.Models.User>(e.UserName)
                       .ConfigureAwait(false);

            var basket = await ctx.UoW().Get <Models.BasketIndex>(e.BasketId)
                         .ConfigureAwait(false);

            basket.Customer   = user.GivenName;
            basket.CustomerId = user.Id;

            basket.Updated = e.Stamp;

            await ctx.UoW().Update(e.BasketId, basket).ConfigureAwait(false);
        }
コード例 #2
0
 private void Handle(Events.BasketClaimed e)
 {
     this.UserName = e.UserName;
 }