Пример #1
0
        public IEnumerable <DogDto> GetAll()
        {
            var dogEntities = _dogRepository.GetAll();

            var dogs = _mapper.Map <IEnumerable <DogEntity>, IEnumerable <DogDto> >(dogEntities);

            return(dogs);
        }
Пример #2
0
        public void Index_Sets_AllDogs_As_Model()
        {
            var expectedModel = new List <Dog>();

            dogRepo.GetAll().Returns(expectedModel);

            var result = underTest.Index();

            var model = result.Model;

            Assert.Equal(expectedModel, model);
        }
        public IActionResult Index()
        {
            var dogs = _repository.GetAll();

            return(View(dogs));
        }
Пример #4
0
        public ViewResult Index()
        {
            var model = dogRepo.GetAll();

            return(View(model));
        }