I want to use LINQ DataSource Control where I nedd to map a user defined class to LINQ table. How I applied the table attribute and column attribute to class in VB.Net ? Ex -
public class Customer
[Table(Name="Customers")]
Dim strid as String
[Column(DBTYPE="varchar")]
Public Property ID() as String
get
return strid
end get
set
stif=value
end set
end class
I got the error on Table and column mapping line.
Please anyone can rectify this problem.
Thanks
Loading
AlanPosted Oct 4, 2008, 6:32 PM
When specifying attributes in VB.Net, you need to use angle rather than square brackets and use a colon before any equals sign. Also don't forget the line continuation character:
Public Class Customer
Dim strid As String
Public Property ID() As String
' etc