Exemple #1
0
        // GET: Defile/Create
        public ActionResult Create()
        {
            var res = new DefileViewModel();

            res.Stylistes = serviceSty.GetMany().ToSelectListItems();
            return(View(res));
        }
Exemple #2
0
        public ActionResult Create(DefileViewModel dvm)
        {
            LeDefile defile = new LeDefile()
            {
                Duree          = dvm.Duree,
                DateEvennement = dvm.DateEvennement,
                StylistId      = dvm.StylistCode,
            };

            servicedef.Add(defile);
            servicedef.Commit();
            return(RedirectToAction("Index"));
        }