I think my question is simple, but I'm new to linq ... So it's hard for me here
My system calls a service called serviceTOP, which returns me a list of itemTOP {Id, Name}
.
These ItemsTOP are not included in my system, but the user can choose which itemTOP to import into the system.
Imported ItemsTOPs become Item { Id, IdTOP, Name }
objects
So, when the system calls serviceTOP, before showing them to the user, I must filter out already imported items from the list.
Go to the code:
IList<ItemsTOP> listTOP = new ServiceTOP().GetItemsTOP(); IList<Items> list = new WCFServiceClient().GetItems(); var filteredListTOP = listTOP.Select( i => i.Id ).Except( i => i.IdTOP );
This type of work, but it returns a list of strings containing only the identifier.
I would like to select both id and TOP name.
Thanks in advance.
Andre source share