public async Task <IActionResult> Create(AddDockerImageViewModel model)
        {
            var result = _mapper.Map <DockerImage>(model);
            await _mediatr.Send(new CreateCommand <DockerImage>(result));

            return(CreatedAtRoute("GetDockerImage", new { id = result.Id }, result));
        }
コード例 #2
0
        public async Task <IActionResult> AddImage(AddDockerImageViewModel model)
        {
            var result = _mapper.Map <DockerImage>(model);

            await _mediatr.Send(new CreateCommand <DockerImage>(result));

            return(Ok(result.Id));
        }