public static void Create(T_Theme theme) { try { using (Entities bdd = new Entities()) { bdd.T_Theme.Add(theme); bdd.SaveChanges(); } } catch (Exception e) { Trace.WriteLine(e.Message); throw; } }
public static void Update(long themeId, T_Theme thm) { try { using (Entities bdd = new Entities()) { T_Theme theme = Get(themeId); theme = thm; bdd.SaveChanges(); } } catch (Exception e) { Trace.WriteLine(e.Message); throw; } }