Exemplo n.º 1
0
        public ActionResult AddColor(AddColorViewModel vm)
        {
            tblColorsService service = new tblColorsService();

            service.addColor(vm.newColor);
            return(RedirectToAction("CarIndex"));
        }
Exemplo n.º 2
0
        public ActionResult AddColor()
        {
            tblColorsService  service = new tblColorsService();
            AddColorViewModel vm      = new AddColorViewModel();

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