public virtual ActionResult Details(int id) { var model = _productHandler.GetById(id); if (model != null) { return(View(model.CreateProductViewModel())); } return(HttpNotFound()); }
public virtual ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CustomerViewModel customerViewModel = _customerHandler.GetById(id.Value).CreateCustomerViewModel(); if (customerViewModel == null) { return(HttpNotFound()); } return(View(customerViewModel)); }