Exemple #1
0
 public ActionResult Create()
 {
     return(View(new FilmInfoContainer()
     {
         AvailableActors = ActorsDao.FindAll(),
         AvailableDirectors = DirectorsDao.FindAll(),
         AvailableGenres = GenresDao.FindAll()
     }));
 }
Exemple #2
0
        // 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));
        }
 // GET: Genres
 public ActionResult Index()
 {
     return(View(GenresDao.FindAll().OrderBy(g => g.Name)));
 }