Ejemplo n.º 1
0
 public ActionResult ViewByManufacturer()
 {
     GuitarCatalog guitarCatalog = new GuitarCatalog();            
     //Hangs
     var guitarManufacturer = guitarCatalog.GetGuitarCatalogByManufacturer("\"Gibson Fender Charvel Taylor Jackson MartinandCompany Dean Epiphone Takamine");
     return View();
 }
Ejemplo n.º 2
0
        public List <GuitarCatalog> GetFullGuitarCatalog()
        {
            List <GuitarCatalog> fullGuitarCatalog = new List <GuitarCatalog>();

            for (int i = 0; i < 1000; i++)
            {
                GuitarCatalog guitarItem = new GuitarCatalog()
                {
                    Id              = i,
                    ProductName     = $"Guitar #{i.ToString()}",
                    Description     = $"The description of item {i.ToString()} goes here.",
                    NumberOfStrings = Guitar.GetNumberOfStrings(),
                    Manufacturer    = Guitar.GetManufacturer(),
                    Image           = "some web address",
                    Price           = (i * 50)
                };
                fullGuitarCatalog.Add(guitarItem);
            }
            return(fullGuitarCatalog);
        }
Ejemplo n.º 3
0
        public List <GuitarCatalog> GetFilteredGuitarCatalog(int count)
        {
            List <GuitarCatalog> filteredGuitarCatalog = new List <GuitarCatalog>();

            for (int i = 0; i < count; i++)
            {
                GuitarCatalog guitarItem = new GuitarCatalog()
                {
                    Id              = i,
                    ProductName     = $"Guitar #{i.ToString()}",
                    Description     = $"The description of item {i.ToString()} goes here.",
                    NumberOfStrings = 6,
                    Manufacturer    = "Fender",
                    Image           = "some web address",
                    Price           = (i * 50)
                };
                filteredGuitarCatalog.Add(guitarItem);
            }

            return(filteredGuitarCatalog);
        }
        public List<GuitarCatalog> GetFilteredGuitarCatalog(int count)
        {
            List<GuitarCatalog> filteredGuitarCatalog = new List<GuitarCatalog>();
            for (int i = 0; i < count; i++)
            {
                GuitarCatalog guitarItem = new GuitarCatalog()
                {
                    Id = i,
                    ProductName = $"Guitar #{i.ToString()}",
                    Description = $"The description of item {i.ToString()} goes here.",
                    NumberOfStrings = 6,
                    Manufacturer = "Fender",
                    Image = "some web address",
                    Price = (i * 50)
                };
                filteredGuitarCatalog.Add(guitarItem);
            }

            return filteredGuitarCatalog;
        }
 public List<GuitarCatalog> GetFullGuitarCatalog()
 {
     List<GuitarCatalog> fullGuitarCatalog = new List<GuitarCatalog>();
     for (int i = 0; i < 1000; i++)
     {
         GuitarCatalog guitarItem = new GuitarCatalog()
         {
             Id = i,
             ProductName = $"Guitar #{i.ToString()}",
             Description = $"The description of item {i.ToString()} goes here.",
             NumberOfStrings = Guitar.GetNumberOfStrings(),
             Manufacturer = Guitar.GetManufacturer(),
             Image = "some web address",
             Price = (i * 50)
         };
         fullGuitarCatalog.Add(guitarItem);
     }
     return fullGuitarCatalog;
 }