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
Mapping a class to LINQ in VB.Net
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
AlanRank #669 · 3.6K reputationPosted Oct 4, 2008, 2:32 PM EDT
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
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts