public static void LoadMoviesByGenre(string genre) { DisplayMovies.Clear(); foreach (Movie m in Status.ct.Movies.Where(x => x.Genre.Contains(genre))) { DisplayMovies.Add(m); } }
public static void LoadPopularMovies() { DisplayMovies.Clear(); foreach (Movie m in Status.ct.Movies.OrderBy(x => x.Rating).Reverse()) { DisplayMovies.Add(m); } }
public static void LoadNewMovies() { DisplayMovies.Clear(); foreach (Movie m in Status.ct.Movies.OrderBy(x => x.Year).Reverse()) { DisplayMovies.Add(m); } }
public static void SearchMovie(string input) { DisplayMovies.Clear(); foreach (Movie m in Status.ct.Movies.AsEnumerable().Where(m => m.Title.Contains(input, StringComparison.OrdinalIgnoreCase)).OrderBy(x => x.Rating)) { DisplayMovies.Add(m); } }