I'm having a tough time with a unique situation. We need to return a unique dataset with all three columns so the result has a unique Company and Item but any of the keys.
We are using LINQ and I have a dataset with the following columns.
Company Item Key
------------------------------------------------------------
CompanyA ItemA 9f94413b-63cb-4ad5-869a-4502988a22c9
CompanyA ItemA 6c6a1b37-84a5-4878-a493-5dad5bf60ee4
CompanyB ItemA 25c5ffca-69a5-45a6-9643-635791dc1bfd
The result I'm hoping for looks like this without care as to which key I get.
Company Item Key
CompanyA ItemA 9f94413b-63cb-4ad5-869a-4502988a22c9
CompanyB ItemA 25c5ffca-69a5-45a6-9643-635791dc1bfd
I've tried every combination of LINQ examples that I could find without success. Is this a case where I first need to get a distinct list of Company/Item then loop again to get a Top(1) for the key on each of the results?