public IEnumerable <string> Execute(IEnumerable <string> inputAsIEnumerable) { var parameters = inputAsIEnumerable.ToList(); cinemaConsole.Clear(); cinemaConsole.WriteLineMiddle("Format: Movie Name | Genre"); try { var input = cinemaConsole.ReadLineMiddle().Split('|'); Validations(input); var movieID = movieServices.GetID(input[0].TrimEnd().TrimStart()); var genreID = genreServices.GetID(input[1].TrimEnd().TrimStart()); movieGenreServices.AddNew(movieID, genreID); cinemaConsole.HandleOperation("\nSuccessfully added to database"); return(parameters.Skip(1)); } catch (InvalidClientInputException e) { cinemaConsole.HandleException(e.Message); return(parameters.Skip(1)); } catch (EntityDoesntExistException e) { cinemaConsole.HandleException(e.Message); return(parameters.Skip(1)); } catch (EntityAlreadyExistsException e) { cinemaConsole.HandleException(e.Message); return(parameters.Skip(1)); } }