public void UpdatePersonne(DTO.Personne Personne, DTO.Personne PersonneUpdated) { using (MesDepensesContext context = new MesDepensesContext()) try { if (Personne != null && PersonneUpdated != null) { PersonneUpdated.PersonneID = Personne.PersonneID; context.Entry(Personne).CurrentValues.SetValues(Personne); } } catch { throw; } }
public void UpdateDepense(DTO.Depense Depense, DTO.Depense DepenseUpdated) { using (MesDepensesContext context = new MesDepensesContext()) try { if (Depense != null && DepenseUpdated != null) { DepenseUpdated.DepenseID = Depense.DepenseID; context.Entry(Depense).CurrentValues.SetValues(Depense); } } catch { throw; } }