コード例 #1
0
ファイル: ThemeCRUD.cs プロジェクト: ThomasCOLLIN/dotNET
 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;
     }
 }
コード例 #2
0
ファイル: ThemeCRUD.cs プロジェクト: ThomasCOLLIN/dotNET
 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;
     }
 }
コード例 #3
0
ファイル: ThemeCRUD.cs プロジェクト: ThomasCOLLIN/dotNET
 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;
     }
 }
コード例 #4
0
ファイル: ThemeCRUD.cs プロジェクト: ThomasCOLLIN/dotNET
 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;
     }
 }