public ActionResult CreateCompetence(Competence skill) { Domain.Entity.Competence c = new Domain.Entity.Competence { idCompetence = skill.idCompetence, Label = skill.Label, Dificulty = skill.Dificulty, idRessource = skill.idRessource, }; cs.Add(c); cs.Commit(); //var path = Path.Combine(Server.MapPath("~/Content/Upload/"), Image.FileName); //Image.SaveAs(path); return(new HttpStatusCodeResult(System.Net.HttpStatusCode.OK)); }
public ActionResult Create(Competence skills) { try { Domain.Entity.Competence c = new Domain.Entity.Competence(); c.Label = skills.Label; c.Dificulty = skills.Dificulty; c.idRessource = skills.idRessource; cs.Add(c); cs.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }