Let me start off by saying that I am very new to WPF and LINQ and have been struggling to learn it while working on a project with it at work (don't you hate having to learn things on the fly and complete the project before a deadline!). Anyway, I have a list box of employees that is being bound in the code behind to an ObservableCollection The datasource for the collection is a LINQ query of type IQueryable.
What I am trying to do is show the LastName + " ," + FirstName format on the listbox, and I am not sure how to pull that off. It will be just for display and does not affect the data in any way. I have tried using the select new syntax for LINQ, however, it does not work because the query is returning an IQueryable and the field does not belong to Employee. The objects in the listbox need to be Employee objects because they can then be saved back to the database or moved to other listboxes in the form for different reasons.
I am not sure where to go form here, and I am sorry if I don't make myself very clear. If you have any further questions about what I need to do, please ask away and I will try to answer. Thanks!