Esempio n. 1
0
        public MovieRepository()
        {
            MovieXMLDataService moviexmldataservice = new MovieXMLDataService();

            using (moviexmldataservice)
            {
                _movies = moviexmldataservice.Read() as List <Movie>;
            }
        }
Esempio n. 2
0
        public void Save()
        {
            //Variable Declarations.
            MovieXMLDataService movieXMLDataService = new MovieXMLDataService();

            //Save the list of movies to the XML File.
            using (movieXMLDataService)
            {
                movieXMLDataService.Write(_movies);
            }
        }