Ejemplo n.º 1
0
        public static void Insertar <T>(T elemento) where T : class
        {
            var ctx = new TaskDbContext();

            ctx.Add <T>(elemento);
            ctx.SaveChanges();
        }
Ejemplo n.º 2
0
 public static void InsertarSinGuardar <T>(T elemento, TaskDbContext ctx) where T : class
 {
     ctx.Add <T>(elemento);
 }