Knight Data Access Layer
Saving Lists VB.NET
Basic Tasks VB.NET > Saving Data > Saving Lists VB.NET

Entire lists of objects can be saved.  The individual objects will be inserted, updated, or deleted.  See also Saving Records.

'Get the current instance of the helper

Dim db As IDataHelper = DataHelper.SessionFactory() 

 

Dim list As New List(Of Person)()

list.Add(New Person With {.FirstName = "John", .LastName = "Warfin"})

list.Add(New Person With {.FirstName = "John", .LastName = "Ya Ya"})

list.Add(New Person With {.FirstName = "John", .LastName = "Small Berries"})

db.Save(list)