public static void Create(T_User user) { try { using (Entities bdd = new Entities()) { bdd.T_User.Add(user); bdd.SaveChanges(); } } catch (Exception e) { Trace.WriteLine(e.Message); throw; } }
public static void Update(long userId, T_User usr) { try { using (Entities bdd = new Entities()) { T_User user = Get(userId); user = usr; bdd.SaveChanges(); } } catch (Exception e) { Trace.WriteLine(e.Message); throw; } }