Exemplo n.º 1
0
        public async Task <IActionResult> BusinessDetails(string?id)
        {
            var businessInox = repo.GetBusinessInoxById(id);

            if (businessInox == null)
            {
                return(NotFound());
            }/*
              * var businessInox = new BusinessInox
              * {
              * Country = Countries.RSA,
              * Name = "Cars",
              * NoxID = id
              * };*/
            ViewBag.countryID = (int)businessInox.Country;
            TempData["NoxID"] = businessInox.NoxID;
            TempData["Name"]  = businessInox.Name;
            TempData.Keep();
            return(View(repo.GetBusinessList()));

            /*return View(new List<Business>
             * {
             *  new Business
             *  {
             *      Id = 1,
             *      Country = Countries.RSA,
             *      Product = Products.QuickView,
             *      Description = "It's quick",
             *      Available = Choice.Yes,
             *      Turnaround = 1,
             *      Price = 7.99M
             *  },
             *  new Business
             *  {
             *      Id = 2,
             *      Country = Countries.RSA,
             *      Product = Products.Research,
             *      Description = "It's slow",
             *      Available = Choice.Yes,
             *      Turnaround = 8,
             *      Price = 900.00M
             *  }
             * });*/
        }