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)); }
public IGraphActionResult RetrieveCupcake(int id) { return(this.Ok(_cupcakeService.RetrieveCupCake(id))); }