Example #1
0
        public IActionResult Index()
        {
            SelectList films = new SelectList(_filmsService.GetAll(), "Id", "Name");

            ViewBag.Films = films;

            SelectList cinemas = new SelectList(_cinemasService.GetAll(), "Id", "Name");

            ViewBag.Cinemas = cinemas;

            return(View());
        }
Example #2
0
 public ActionResult Get() => Ok(Mapper.Map <IEnumerable <FilmDTO>, IEnumerable <FilmBrief> >(_FilmsService.GetAll()));
Example #3
0
 public async Task <IActionResult> Get()
 {
     return(Ok(await _service.GetAll()));
 }
 public ActionResult <IEnumerable <FilmsVM> > Get()
 {
     return(_filmsService.GetAll());
 }