public async Task <IActionResult> Create([FromBody] NewMovieCommand command)
        {
            // var result = await _mediator.Send(command);
            var result = await Mediator.Send(command);

            return(Ok(result));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([FromBody] NewMovieDTO newMovie)
        {
            var command = new NewMovieCommand
            {
                Id   = newMovie.Id,
                Name = newMovie.Name
            };
            var result = await _mediator.Send(command);

            return(Ok(result));
        }