I want to write a class statement like the one below. It does not have any reference to db.mdf so there is an error in Me.Products. I have dragged the "Products" table into a dbml if that helps anything.
db = new DBDataContext(c:\path\db.mdf)
class1.vb
Partial Public Class DBDataContext
Dim Products As Object
Public Function GetProductsByCategory(ByVal id1 As Integer) As IEnumerable(Of Products)
Return From p In Me.Products _
Where p.ProductID = id1 _
Select p
End Function
End Class