public IEnumerable <DogDto> GetAll() { var dogEntities = _dogRepository.GetAll(); var dogs = _mapper.Map <IEnumerable <DogEntity>, IEnumerable <DogDto> >(dogEntities); return(dogs); }
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)); }
public ViewResult Index() { var model = dogRepo.GetAll(); return(View(model)); }