DRAG DROP
Exhibit:
Public Property EmployeeID() As integer
End Get
Set
End Set
End Properly
Public Property EmployeeName() As String
Get
End Get
End Set
End Property
Public Property City As String
Get
End Get
End Set
End Property Public Property CV() As Byte()
Get
End Get
set
End Set
End Property
There is MS Visual Studio 2010 and MS .NET Framework 4 application PassGuideApp.
PassGuideApp connects to a MS SQL Server database PassGuideDB.
To obtain data from PassGuideDB ADO.NET LINQ to SQL model is used.
There is a class Employee. See exhibit for definition.
You need to add a collection EmployeeRelatives, with deferred loading, to Employee class.
Which code do you need to add?
I don’t like the fact that these examples are in Visual Basic now, instead of the usual C#. In any case, the key here is that in order to support Deferred (lazy) Loading you need to declare your property as ‘virtual’:
Source: http://blogs.msdn.com/b/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx
Declare the property that you would like to load lazily as virtual.
Duplicate of question #17, but this one is in VB.