public async Task <ActionResult <JobDto> > CreateOneJobAsync(CreateJobCommand command) { var job = await this._mediator.Send(command); return(Ok(job)); }
public async Task <IActionResult> Create([FromBody] CreateJobCommand command) { var id = await Mediator.Send(command); return(CreatedAtAction(nameof(Get), new { id }, new { id })); }
private void CreateJob(int manpowerRequestId) { var createJobCommand = new CreateJobCommand(manpowerRequestId); _bus.SendCommand(createJobCommand); }