Пример #1
0
        public ActionResult MovieList()
        {
            VidlyEntities db     = new VidlyEntities();
            List <movie>  movies = db.movies.ToList <movie>();

            return(View(movies));
        }
Пример #2
0
 public ActionResult Details(int id)
 {
     using (VidlyEntities _contex = new VidlyEntities())
     {
         Customer customer = _contex.Customers.SingleOrDefault(x => x.Id == id);
         return(View(customer));
     }
 }
Пример #3
0
 public ActionResult getCustomers()
 {
     using (VidlyEntities _contex = new VidlyEntities())
     {
         List <Customer> customers = _contex.Customers.ToList();
         return(View(customers));
     }
 }
Пример #4
0
        // GET: Movies
        public ActionResult Random()
        {
            using (VidlyEntities _contex = new VidlyEntities())
            {
                Movie           movie     = _contex.Movies.SingleOrDefault(x => x.Id == 1);
                List <Customer> customers = _contex.Customers.ToList();

                var randomMovieCustomer = new RandomMovieViewModel()
                {
                    Movie     = movie,
                    Customers = customers
                };
                return(View(randomMovieCustomer));
            }
        }
Пример #5
0
 public ActionResult CreateMovie(MovieModel movie)
 {
     VidlyEntities db = new VidlyEntities();
 }