Beispiel #1
0
        public IActionResult GetAllCinemas()
        {
            var objList = cinemaRepository.GetCinemas();
            var objDto  = new List <CinemaDto>();

            foreach (var item in objList)
            {
                objDto.Add(mapper.Map <CinemaDto>(item));
            }

            return(Ok(objDto));
        }
        public async Task <IEnumerable <CinemaModel> > GetCinemas()
        {
            IEnumerable <CinemaDalModel> cinemas = await _cinemaRepository.GetCinemas();

            return(cinemas.Select(Mapper.Map <CinemaModel>));
        }