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)); }
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)); }
public IEnumerable <Director> GetDirectors() { var directors = _directorService.GetDirectors(); return(directors); }
public async Task <IActionResult> Get() { var directors = await _directorService.GetDirectors(); return(Ok(directors)); }