コード例 #1
0
        public async Task <ActionResult <JobDto> > CreateOneJobAsync(CreateJobCommand command)
        {
            var job = await this._mediator.Send(command);

            return(Ok(job));
        }
コード例 #2
0
        public async Task <IActionResult> Create([FromBody] CreateJobCommand command)
        {
            var id = await Mediator.Send(command);

            return(CreatedAtAction(nameof(Get), new { id }, new { id }));
        }
コード例 #3
0
        private void CreateJob(int manpowerRequestId)
        {
            var createJobCommand = new CreateJobCommand(manpowerRequestId);

            _bus.SendCommand(createJobCommand);
        }