public async Task <IActionResult> Upload(string movieIdsString) { string[] movieIds = movieIdsString.Trim(' ').Split(',', ';'); var command = new ImportImdbMoviesInfoCommand { ImdbMovieIds = movieIds }; await pipelineService.HandleCommandAsync(command); return(View()); }
/// <summary> /// Handle command async. /// </summary> public async Task HandleImportImdbMoviesInfoAsync(ImportImdbMoviesInfoCommand command, IMoviesService service) { if (command == null) { throw new ArgumentNullException(nameof(command)); } if (service == null) { throw new ArgumentNullException(nameof(service)); } await service.UploadAsync(command.ImdbMovieIds); }