public async Task <IActionResult> RestockProduct(Guid productId, [FromBody] int amountToAdd) { var command = new RestockProductCommand(productId, amountToAdd); var result = await CartSystem.RestockProduct(command); if (result.IsSuccessful) { return(Ok()); } return(BadRequest(result.Message)); }
public async Task <CommandResult> RestockProduct(RestockProductCommand command) { return(await _commandActor.Ask <CommandResult>(command)); }