コード例 #1
0
        public IGraphActionResult SellCupcake(int id)
        {
            var sold = _cupcakeService.SellSingleCupcake(id);

            if (sold)
            {
                var cupcake = _cupcakeService.RetrieveCupCake(id);
                this.PublishSubscriptionEvent(PastryConstants.CUPCAKE_SOLD, cupcake);
            }

            return(this.Ok(sold));
        }
コード例 #2
0
 public IGraphActionResult RetrieveCupcake(int id)
 {
     return(this.Ok(_cupcakeService.RetrieveCupCake(id)));
 }