Beispiel #1
0
        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);
        }
Beispiel #3
0
 public IEnumerable <Manufacturer> GetManufacturers()
 {
     return(_manufacturerRepository.GetManufacturers());
 }
Beispiel #4
0
 public ActionResult Index()
 {
     return(View(repo.GetManufacturers()));
 }
Beispiel #5
0
        private IEnumerable <ManufactureListItemViewModel> GetManufacturers()
        {
            var manufacturers = manufacturerRepository.GetManufacturers(ContentItemIdentifiers.MANUFACTURERS);

            return(manufacturers.Select(manufacturer => new ManufactureListItemViewModel(manufacturer, pageUrlRetriever)));
        }