public static void Insertar <T>(T elemento) where T : class { var ctx = new TaskDbContext(); ctx.Add <T>(elemento); ctx.SaveChanges(); }
public static void InsertarSinGuardar <T>(T elemento, TaskDbContext ctx) where T : class { ctx.Add <T>(elemento); }