Matty Bear
Matty Bear

Reputation: 527

Use Custom DTOs in WCF RIA in VB.NET

Need help with converting my VB.NET DTOs so that they can be used by WCF RIA for a LightSwitch application.

I found a great example here: http://blogs.msdn.com/b/brada/archive/2009/07/16/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-6-data-transfer-objects-dtos.aspx

My question that I have failed to find an answer for is how do I represent the syntax marked in the square brackets in the C# code in VB.NET?

public class SuperEmployeeDTO{

public SuperEmployeeDTO()        
{        
}  

[ReadOnly(true)]        
[Key]        
public int EmployeeID {get;set;}

Thanks in advance :)

Upvotes: 0

Views: 342

Answers (1)

Robbie Tapping
Robbie Tapping

Reputation: 2556

<[ReadOnly](True)>
<Key()>
Public Property EmployeeID() As Integer
    Get
        Return m_EmployeeID
    End Get
    Set(ByVal value As Integer)
        m_EmployeeID = value
    End Set
End Property
Private m_EmployeeID As Integer

Upvotes: 1

Related Questions