public async Task <Response <Exception, AppUnit> > Handle(MovieDeleteMultipleCommand request, CancellationToken cancellationToken) { var deleteMovieCallback = await _movieRepository.DeleteMultipleAsync(request.MovieIds); if (deleteMovieCallback.HasError) { return(deleteMovieCallback.Error); } return(AppUnit.Successful); }
public async Task <IActionResult> DeleteMultiple([FromBody] MovieDeleteMultipleCommand movieDeleteMultipleCommand) { return(HandleCommand(await _mediator.Send(movieDeleteMultipleCommand))); }