
Untitled
By: a guest on
Aug 5th, 2012 | syntax:
None | size: 0.74 KB | hits: 9 | expires: Never
Class structure of database in a asp.net program
Partial Public Class PubsContext
Dim authors As Object
Public Function GetProductsByCategory(ByVal id1 As Integer) As IEnumerable(Of authors)
Return From p In Me.authors _
Where p.au_id = id1 _
Select p
End Function
End Class
Public Class _Default
Inherits System.Web.UI.Page
Dim author As Object
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim db As New PubsContext("c:SQL Server 2000 Sample DatabasesPUBS.MDF")
Dim authors = From p In db.authors _
Select p
GridView1.DataSource = author
GridView1.DataBind()
End Sub
End Class