This works:
Code: Select all
Class MyProduct
Public ID As Integer
Public Name As String
Public Preis As Decimal
End Class
Sub Main()
Dim sql2 As String = "SELECT id, name, preis FROM produkt"
Using ctx As New db.TestDB()
Dim produkte = ctx.ExecuteQuery(Of MyProduct)(sql2, New Object() {})
For Each p In produkte
Console.WriteLine("ID: {0}, Name: {1}, Preis: {2:C}", p.ID, p.Name, p.Preis)
Next
End Using
Console.ReadLine()
End Sub
And please document the ExecuteQuerya dn ExecuteCommand methods and their limitations.