Пример #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());
        }
Пример #2
0
 public ActionResult Get() => Ok(Mapper.Map <IEnumerable <FilmDTO>, IEnumerable <FilmBrief> >(_FilmsService.GetAll()));
Пример #3
0
 public async Task <IActionResult> Get()
 {
     return(Ok(await _service.GetAll()));
 }
Пример #4
0
 public ActionResult <IEnumerable <FilmsVM> > Get()
 {
     return(_filmsService.GetAll());
 }