Beispiel #1
0
        // GET: Product/Details/5
        public ActionResult Details(int id)
        {
            ViewData["username"] =
                HttpContext.Session.GetString("ConnectedUserId") ??
                string.Empty;

            return(View(_productBl.GetProductById(id)));
        }
        public async Task <IActionResult> Get(int id)
        {
            Product result = await _productBl.GetProductById(id);

            if (result != null)
            {
                return(Ok(result));
            }
            return(NotFound());
        }