public void OnPost() { Movies = MovieDatabase.All; if (rating.Count != 0) { Movies = MovieDatabase.Filter(Movies, rating); } if (search != null) { Movies = MovieDatabase.Search(Movies, search); } if (minIMDb != null) { Movies = MovieDatabase.FilterByMinIMDb(Movies, (float)minIMDb); } }
public void OnPost() { Movies = MovieDatabase.All; if (search != null) { Movies = MovieDatabase.Search(Movies, search); } if (rating.Count > 0) { Movies = MovieDatabase.FilterByMPAA(Movies, rating); } if (minIMDb != null) { Movies = MovieDatabase.FilterByMinIMDb(Movies, (float)minIMDb); } /* if (search != null && rating.Count != 0) * { * Movies = movieDatabase.SearchAndFilter(search, rating); * } * else if (rating.Count != 0) * { * Movies = movieDatabase.Filter(rating); * } * else if (search != null) * { * Movies = movieDatabase.Search(search); * } * else * { * Movies = movieDatabase.All; * } */ }