public static void insert <T>(T Tentity) where T : class { using (var context = new dbEntities()) { context.Set <T>().Add(Tentity); context.SaveChanges(); } }
public void Saveing() { try { db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e); throw; } }