Пример #1
0
        public IActionResult Index()
        {
            var phone = _phoneRepository.GetAllPhones().OrderBy(p => p.Name);

            var homeViewModel = new HomeViewModels()
            {
                Phones = phone.ToList()
            };

            return(View(homeViewModel));
        }
Пример #2
0
        public ViewResult Index()
        {
            var phones = new PhoneListViewModel()
            {
                Phones = _phoneRepository.GetAllPhones()
            };

            _reservationService.ReservationChecker();

            return(View(phones));
        }
Пример #3
0
        public ActionResult ComparePhones()
        {
            var phones = phonesRepository.GetAllPhones();

            return(View(phones));
        }
Пример #4
0
        public IEnumerable <Phone> GetAllPhones()
        {
            IEnumerable <Phone> phones = repository.GetAllPhones();

            return(phones);
        }
Пример #5
0
        public async Task <List <Phone> > GetAllPhones()
        {
            var phones = await _repository.GetAllPhones();

            return(phones);
        }