Ejemplo n.º 1
0
        // GET: Customer
        public ActionResult Index()
        {
            applicationDbContext = new ApplicationDbContext();

            var cList = new SomeFilmViewModel();

            cList.Customers = applicationDbContext.Customers.Include("MemberShip").Include("Genre").ToList();


            return(View(cList));
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            applicationDbContext = new ApplicationDbContext();
            var mList = new SomeFilmViewModel();

            foreach (var item in applicationDbContext.Movies.Include("Genre").ToList())
            {
                mList.Movies.Add(item);
            }
            return(View(mList));
        }