Example #1
0
 private static void OnMovieInserted(IMovieQueryFacade movieRepository)
 {
     Console.Clear();
     Console.WriteLine("MOVIE INSERTED:");
     movieRepository.GetAll().ToList().ForEach(Console.WriteLine);
     Console.WriteLine("press a <ENTER>...");
     Console.ReadLine();
 }
Example #2
0
 private static void OnTitleChanged(IMovieQueryFacade movieRepository)
 {
     Console.Clear();
     Console.WriteLine("MOVIE TITLE CHANGED:");
     movieRepository.GetAll().ToList().ForEach(Console.WriteLine);
     Console.WriteLine("press a <ENTER>...");
     Console.ReadLine();
 }
 private void Refresh()
 {
     _movies.Clear();
     _movieRepository.GetAll().ToList().ForEach(x => _movies.Add(new MovieViewModel(x.Id)
     {
         Title       = x.Title,
         Genre       = x.Genre,
         ReleaseDate = x.ReleaseDate.ToString("yyyy", CultureInfo.InvariantCulture),
         Price       = x.Price
     }));
     _movies.CollectionChanged += MoviesOnCollectionChanged;
 }
        // GET: Movies
        public ActionResult Index()
        {
            var movies = _movieQueryFacade.GetAll().Select(x => new MovieVm
            {
                Id    = x.Id,
                Title = x.Title,
                Genre = x.Genre,
                Year  = x.ReleaseDate.Year,
                Price = x.Price
            });

            return(View(movies));
        }