Пример #1
0
 public static void insert <T>(T Tentity) where T : class
 {
     using (var context = new dbEntities())
     {
         context.Set <T>().Add(Tentity);
         context.SaveChanges();
     }
 }
Пример #2
0
 public void Saveing()
 {
     try
     {
         db.SaveChanges();
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }