public async Task <IActionResult> Post([FromBody] AddProductCommandModel model) { var productId = await bus.SendAsync(model); return(Ok(new { ProductId = productId })); }
public async Task <IActionResult> Post([FromBody] AddProductCommandModel model) => Ok(await mediator.Send(model));
public async Task <IActionResult> Post([FromBody] AddProductCommandModel model) => Ok(await bus.SendAsync(model));