// GET: Films public ActionResult Index([ModelBinder(typeof(UserModelBinder))] User user) { return(View(FilmsDao.FindAllWithGenres() .Select(f => new FilmView(f) { IsFav = user.HasFavourite(f.ID) }) .OrderBy(f => f.Title))); }
// GET: Home public ActionResult Index([ModelBinder(typeof(UserModelBinder))] User user) { var info = new FilmsSearchInfoBase() { Genres = GenresDao.FindAll() .OrderBy(g => g.Name), Actors = ActorsDao.FindAll() .Select(a => new ActorView(a)) .OrderBy(a => a.FullName) .ToList(), FilmsDefaultView = FilmsDao.FindAllWithGenres() .Select(f => new FilmView(f) { IsFav = user.HasFavourite(f.ID) }) .OrderByDescending(f => f.ReleaseDate) }; return(View(info)); }