// GET: Defile/Create public ActionResult Create() { var res = new DefileViewModel(); res.Stylistes = serviceSty.GetMany().ToSelectListItems(); return(View(res)); }
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")); }