troubleshooting Question

linq, c#

Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America asked on
C#LINQ Query
8 Comments1 Solution175 ViewsLast Modified:
Below is my linq / c# and it return duplicated record. All I need to return one "blue shied"
How can I do that?

    public List<Domain.Carrier> GetCarrierList()
            Repository.CarrierInformation.GenericDataContext gdc = new Repository.CarrierInformation.GenericDataContext();
            return (
                    from tblCarriersData in gdc.TblCarriers
                    join tblCarrierContactsData in gdc.TblCarrierContacts
                    on tblCarriersData.CarrierID equals tblCarrierContactsData.CarrierID
                    orderby tblCarriersData.Name
                    select new Domain.Carrier()
                        name = tblCarriersData.Name,
                        carrierID = tblCarriersData.CarrierID

Blue Shield
Blue Shield
Blue Shield
Blue Shield
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros