Example #1
0
        public ActionResult <bool> Delete([FromBody] DeleteArtistDTO request)
        {
            var command = new DeleteArtistCommand(_mapper.Map <Artist>(request));
            var handler = _commandHandler.Build(command);

            return(Ok(handler.Execute()));
        }
Example #2
0
 public ICommandHandler <DeleteArtistCommand, bool> Build(DeleteArtistCommand command)
 {
     return(new DeleteArtistCommandHandler(_service, command));
 }
Example #3
0
        public async Task <IActionResult> DeleteArtist([FromBody] DeleteArtistCommand command)
        {
            var result = await _mediator.Send(command);

            return(Ok(result));
        }