public ActionResult Create() { var enumData = from CarColors c in Enum.GetValues(typeof(CarColors)) select new { Name = c.ToString() }; ViewBag.CarColors = enumData; ViewBag.Category = _categoryRep.GetAll(); ViewBag.Gear = _gearRep.GetAll(); ViewBag.Fuel = _fuelRep.GetAll(); return(View()); }
public void PopulationDropDownList() { ViewBag.Category = _categoryRep.GetAll(); ViewBag.Fuel = _fuelRep.GetAll(); ViewBag.Gear = _gearRep.GetAll(); }
// GET: GearCRUD public ActionResult Index() { return(View(_gearRep.GetAll())); }