public ActionResult Detail(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProductViewModel productViewModel = productServices.Detail(Convert.ToInt32(id)); return(PartialView(productViewModel)); }