Exemplo n.º 1
0
        public async Task <IHttpActionResult> GetAsync()
        {
            await Task.Yield();

            var allDirectors = directorService.GetDirectors();

            return(Ok(allDirectors));
        }
        public IActionResult Create()
        {
            var Categories = _categoryService.GetCategories();
            var Directors  = _directorService.GetDirectors();

            MovieViewModel movieViewModel = new MovieViewModel
            {
                Categories = GetSelectListItemsCategory(Categories),
                Directors  = GetSelectListDirectors(Directors),
            };

            return(View(movieViewModel));
        }
Exemplo n.º 3
0
        public IActionResult Create()
        {
            var Genres     = _movieService.GetGenres();
            var Directors  = _directorService.GetDirectors();
            var Producers  = _producerService.GetProducers();
            var Publishers = _publisherService.GetPublishers();

            MovieViewModel movieViewModel = new MovieViewModel
            {
                Genres     = GetSelectListItemsGenres(Genres),
                Directors  = GetSelectListItemsDirectors(Directors),
                Producers  = GetSelectListProducers(Producers),
                Publishers = GetSelectListPublishers(Publishers)
            };

            return(View(movieViewModel));
        }
        // GET: Director
        public IActionResult Index()
        {
            var directorsList = _directorService.GetDirectors();

            return(View(directorsList));
        }
Exemplo n.º 5
0
        public IEnumerable <Director> GetDirectors()
        {
            var directors = _directorService.GetDirectors();

            return(directors);
        }
        public async Task <IActionResult> Get()
        {
            var directors = await _directorService.GetDirectors();

            return(Ok(directors));
        }