public IActionResult EditPrice(int Id) { var price = _price.FindById(Id); if (price == null) { return(RedirectToAction("Error404", "Error")); } var model = new PriceViewModel { Packages = _package.GetAll().ToList(), Terms = _term.GetAll().OrderBy(term => term.Value).ToList(), Price = price }; return(View(model)); }