i need to insert 5000 record on the database. I'm doing that with the followind code
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
Dim testinsert As New TestTableEntity
Dim C1 As Integer
Dim numrec As Integer
For C1 = 1 To 5000
testinsert.R1 = C1
testinsert.IsNew = True
testinsert.Save()
TextBox4.Text = C1
Next
MsgBox("FIN")
End Sub
each time a create a new record i save it to the database. is there a way to create all of them in memory first and them save them to the database in just one shot?
thanks.