예제 #1
0
        public ActionResult AddColor(AddColorViewModel vm)
        {
            tblColorsService service = new tblColorsService();

            service.addColor(vm.newColor);
            return(RedirectToAction("CarIndex"));
        }
예제 #2
0
        public ActionResult AddColor()
        {
            tblColorsService  service = new tblColorsService();
            AddColorViewModel vm      = new AddColorViewModel();

            vm.colors = service.getColors();
            return(View(vm));
        }