Exemplo n.º 1
0
        //get all movies
        public IHttpActionResult Get()
        {
            MovieServices movieService = CreateMovieService();
            var           movies       = movieService.GetMovies();

            return(Ok(movies));
        }
Exemplo n.º 2
0
        public ActionResult Index(string user)
        {
            var model = new MovieModel
            {
                Movies   = _movie.GetMovies(),
                LoggedIn = user != null ? true : false,
                User     = (user != null ? true : false) == true?_account.GetUserDetails(user) : null
            };

            return(View(model));
        }
Exemplo n.º 3
0
        public IActionResult ShowMovie()
        {
            MovieDataServices movieDataServices = new MovieDataServices();
            MovieServices     movieServices     = new MovieServices(movieDataServices);

            List <MovieModel> movies = movieServices.GetMovies();

            ListOfMovies movieList = new ListOfMovies();

            movieList.Movies = movies;

            return(View(movieList));
        }