public ActionResult Index() { var manufacturers = manufacturerRepository.GetManufacturers(ContentItemIdentifiers.MANUFACTURERS); var model = GetManufacturersViewModel(manufacturers); return(View(model)); }
public void GetManufacturers_Success_ReturnEntities() { // Arrange var repository = new ManufacturerRepository(); // Act var result = repository.GetManufacturers(); // Assert Assert.IsInstanceOf <IEnumerable <Manufacturer> >(result); }
public IEnumerable <Manufacturer> GetManufacturers() { return(_manufacturerRepository.GetManufacturers()); }
public ActionResult Index() { return(View(repo.GetManufacturers())); }
private IEnumerable <ManufactureListItemViewModel> GetManufacturers() { var manufacturers = manufacturerRepository.GetManufacturers(ContentItemIdentifiers.MANUFACTURERS); return(manufacturers.Select(manufacturer => new ManufactureListItemViewModel(manufacturer, pageUrlRetriever))); }