public async Task Handle(Events.PictureSet e, IMessageHandlerContext ctx) { var product = await ctx.UoW().Get <Models.CatalogProductIndex>(e.ProductId).ConfigureAwait(false); product.PictureContents = e.Content; product.PictureContentType = e.ContentType; await ctx.UoW().Update(e.ProductId, product).ConfigureAwait(false); }
public async Task Handle(Events.PictureSet e, IMessageHandlerContext ctx) { var campaign = await ctx.UoW().Get <Models.Campaign>(e.CampaignId) .ConfigureAwait(false); campaign.PictureContents = e.Content; campaign.PictureContentType = e.ContentType; await ctx.UoW().Update(e.CampaignId, campaign).ConfigureAwait(false); }