Пример #1
0
 public static void Create(T_MediaType mediaType)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             bdd.T_MediaType.Add(mediaType);
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }
Пример #2
0
 public static void Create(T_MediaType mediaType)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             bdd.T_MediaType.Add(mediaType);
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }
Пример #3
0
 public static void Update(long mediaTypeId, T_MediaType mdType)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             T_MediaType mediaType = Get(mediaTypeId);
             mediaType = mdType;
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }
Пример #4
0
 public static void Update(long mediaTypeId, T_MediaType mdType)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             T_MediaType mediaType = Get(mediaTypeId);
             mediaType = mdType;
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }