private List <Product> GetList(String ID) { var list = db.Get_All().Where(item => item.ID.Contains(ID)).ToList(); foreach (var item in list) { item.Category = MC.Get(item.Category_ID); item.Producer = MP.Get(item.Producer_ID); } return(list); }
// GET: Producers/Details/5 public ActionResult Details(int id) { var action = new CheckController().CheckStatus("Producers"); if (action != null) { return(action); } //if (id == null) //{ // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); //} Producer producer = db.Get(id); if (producer == null) { return(HttpNotFound()); } return(View(producer)); }