>Are you sure that worked and didn't just compile? The OfType function will only return the results of your query that match a particular type. This guarantees that your query is returning an IEnumerable or IQueryable list of type IQueryable. If however your result set contains objects of an anonymous type, you will simply get no results, since no objects in your result set match that type. It will compile, but you will always get nothing.
>
>I think that in order to get the results you are looking for, your select clause needs to return an object of type ClientAPI.ClientService.Client. I would try the following:
oClient = (From c
> In oGeneric.GetClients()
> Where c.Id = nClientID
> Select new ClientAPI.ClientService.Client() { FirstName = c.FirstName, LastName = c.cLastName} ).FirstOrDefault()
I tried that syntax and everything is intellisense except the FirstName and LastName, the ones just before the equal signs. This one generates design time error:
"Name 'FirstName' is either not declared or not in the current scope."
I am trying to see if this is just a syntax error. That seems like an interesting approach.