>>Not sure I understand. You are still creating an instance of ClientAPI.ClientService.Client and all of its fields will be present. The only difference is that everything other than FirstName and LastName will have default values.
>
>Well, the foreign provider wants us to adjust those Linq queries to collect only the required fields and not returning the entire record. Does this mean I have more adjustment to do here?
>
>As if this returns the entire record, but empty values for the other fields, I am not better than before. lol
Best solution would depend on what you need to do with the simple FirstName/LastName structure. You could create a new class with just the FirstName/LastName fields and then
Private shortClient As ShortClientInfo = GetClients.Where(Function(x) x.Id = id).[Select](Function(s) New ShortClientInfo() With { _
Key .LastName = s.LastName, _
Key .FirstName = s.FirstName _
}).FirstOrDefault()
(Hope the VB's OK - used a converter from C# :-{ )
But if you do *not* need to access this outside of the method where the selection is made you could just use an anonymous type:
Dim shortClient = GetClients.Where(Function(x) x.Id = id).[Select](Function(x) New With { _
Key .LastName = x.LastName, _
Key .FirstName = x.FirstName _
}).FirstOrDefault()
shortClient.LastName, shortClient.FirstName will be valid within the scope of the linq statement.