Exemplo n.º 1
0
        public ActionResult DVDDetails(int id)
        {
            var vm = new DVDDetailVM();
            var repo = new DVDRepo();
            var results = new List<DVDActorDetail>();
            results = repo.GetActorDetails(id);

            vm.Dvd = repo.GetDVDById(id);
            vm.StudioDescription = repo.GetStudioDescription(vm.Dvd.StudioID);
            vm.ActorNames = repo.GetActorById(results);

            return View(vm);
        }
Exemplo n.º 2
0
        public ActionResult ListBorrowersByDVD(int id)
        {
            var vm = new DvdBorrowerDetailVM();
            var dvdRepo = new DVDRepo();
            var borrowerRepo = new BorrowerRepo();

            vm.Dvd = dvdRepo.GetDVDById(id);
            vm.BorrowerDetails = borrowerRepo.GetAllBorrowerDetails(id);
            vm.Borrowers = borrowerRepo.GetBorrowerById(vm.BorrowerDetails);

            return View(vm);
        }