Exemple #1
0
 public Task <IActionResult> PostAsync(
     [FromServices] IPostCarCommand command,
     [FromBody] CarSm car,
     CancellationToken cancellationToken)
 {
     return(command.ExecuteAsync(car, cancellationToken));
 }
Exemple #2
0
 public Task <IActionResult> Post(
     [FromServices] IPostCarCommand command,
     [FromBody] SaveCar car,
     CancellationToken cancellationToken) => command.ExecuteAsync(car);
 public IActionResult Post(
     [FromServices] IPostCarCommand command,
     [FromBody] SaveCar car) => command.Execute(car);