// GET: Sellers/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            var seller = await _sellerServices.FindById(id);

            if (seller == null)
            {
                return(RedirectToAction(nameof(Error), new { message = String.Format("No seller found with id of {0}.", id) }));
            }

            return(View(seller));
        }
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var obj = _sellerServices.FindById(id.Value);

            if (obj == null)
            {
                return(NotFound());
            }
            return(View(obj));
        }
Пример #3
0
        public IActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var seller = _sellerService.FindById(id.Value);

            if (seller == null)
            {
                return(NotFound());
            }
            return(View(seller));
        }