public void UpdateMoviesFromFiles() { //get the imdbids from the files string documentPath = String.Format("{0}/Documents", Environment.CurrentDirectory); var dirInfo = new DirectoryInfo(documentPath); var scrapper = new ImdbScrapper(_xPathRepository); foreach (var fileInfo in dirInfo.GetFiles("*.txt")) { var updatedMovie = scrapper.LoadMovieFromFile(fileInfo.FullName); var movie = _movieRepository.GetByImdbId(fileInfo.Name); UpdateMovie(movie, updatedMovie); _unitOfWork.Commit(); } //update the data }
public void LoadMovieFromFile() { var scrapper = new ImdbScrapper(_xPathRepository); var movie = scrapper.LoadMovieFromFile(@"C:\tt1038988.txt"); }