public IActionResult Index() { var directorList = _directorService.GetAllDirectors(); if (directorList != null) { _logger.LogInformation(LoggerMessageDisplay.DirectorsListed); } else { _logger.LogInformation(LoggerMessageDisplay.NoDirectorsInDB); } return(View(directorList)); }
public IActionResult Create() { var Genres = _genreService.GetAllGenres(); var Directors = _directorService.GetAllDirectors(); MovieViewModel movieViewlModel = new MovieViewModel(); movieViewlModel.Genres = GetSelectListItemsGenres(Genres); movieViewlModel.Directors = GetSelectListItemsDirectors(Directors); if (Genres != null && Directors != null) { _logger.LogInformation(LoggerMessageDisplay.MovieCreated); } else { _logger.LogInformation(LoggerMessageDisplay.MovieCreatedNotFound); } return(View(movieViewlModel)); }