Hi Elvin,
It should work only by putting the custom property into your EntityClass partial class. Example of the code inside the entity:
Namespace [YourRootNamespace].EntityClasses
Public Partial Class CustomerEntity
Public ReadOnly Property FullName() As String
Get
Return String.Format("{0} - {1}", Me.ContactTitle, Me.ContactName)
End Get
End Property
End Class
End Namespace
Note that it's a Property, not a Function. Then in your WinForm application:
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
' Fetch customers, which is a CustomerCollection, or an EntityCollection(Of CustomerEntity) for adapter.
' ...
_cbxCustomers.DataSource = customers
_cbxCustomers.DisplayMember = "FullName"
_cbxCustomers.ValueMember = "CustomerId"
_cbxCustomers.Refresh()
End Sub
It should work without problems.