public static Employe RemoveEmploye(string nom) { using (CONCURENSYEntities Context = new CONCURENSYEntities()) { Employe emp = Context.Employes.Find(nom); Context.Employes.Remove(emp); Context.SaveChanges(); return(emp); } }
public static void saveEmploye(CONCURENSYEntities ctx, Employe emp) { ctx.Entry(emp).State = EntityState.Modified; ctx.SaveChanges(); }