Пример #1
0
        // private ApplicationDbContext db = new ApplicationDbContext();

        // GET: ColorVehicle
        public ActionResult Index()
        {
            //return View(db.ColorVehicles.ToList());

            ColorVehicleData data = new ColorVehicleData();

            return(View(data.GetColorVehicles()));
        }
Пример #2
0
        // GET: Vehicle/Create
        public ActionResult Create()
        {
            //ViewBag.ColorId = new SelectList(db.ColorVehicles, "ColorId", "Name");
            ColorVehicleData dataColor = new ColorVehicleData();

            ViewBag.ColorId = new SelectList(dataColor.GetColorVehicles(), "ColorId", "Name");
            return(View());
        }