public ActionResult Details(int id) { ViewBag.RationID = id; var ration = _rationService.FindById(id); var rationViewModel = BindRationViewModel(ration); var commdities = (from item in _commodityService.GetAllCommodity() select new { item.CommodityID, item.Name }); ViewData["commodities"] = commdities; ViewData["UnitMeasures"] = _commodityService.GetAllUnit(); return(View(rationViewModel)); }