Is there a way to make this code excute in one query with Entity-Framework?
Private Sub LoadFirstPhone(vendor As Vendor)
If Not vendor.ContactReference.IsLoaded Then _
vendor.ContactReference.Load(MergeOption.AppendOnly)
vendor.Contact.Phones.Load(MergeOption.AppendOnly)
End Sub
I want two things:
- I want to be able to Load only the first phone, not all of the phones
- I want to make it one query, so it doesn't have to make 2 round-trips