public ActionResult _Edit(int id) { ProductConsumptionLineViewModel s = _BomDetailService.GetDesignConsumptionLineForEditForProduct(id); ProductConsumptionLineViewModel temp = _BomDetailService.GetBaseProductDetailForProduct(s.BaseProductId); s.ProductName = temp.ProductName; s.QualityName = temp.QualityName; s.Weight = temp.Weight; if (s == null) { return(HttpNotFound()); } return(PartialView("_Create", s)); }