Avatar of ITsolutionWizard
ITsolutionWizard
Flag for United States of America asked on

linq, aspx

my str will look like 111,222,3333

in where statement - can you share with me what I should do below?

    public List<Domain.Document> returnProposalList(string str)
        {
            //get state/carriername/planname
            Repository.DocumentDataContext ddc = new Repository.DocumentDataContext();
            return
                (
                from tblCarrierProductsData in ddc.TblCarrierProducts
                join tblDocuments in ddc.TblDocuments
                on tblCarrierProductsData.CarrierProductID equals tblDocuments.CarrierProductID
                where (tblCarrierProductsData.CarrierProductID == str && tblCarrierProductsData.State == "CA")             
                select new Domain.Document()
                {
                    carrierProductID = tblCarrierProductsData.CarrierProductID,
                   
                    documentID = tblDocuments.DocumentID,                    
                    documentType = tblDocuments.DocumentType,
                    note = tblDocuments.Note,
                    pdf = tblDocuments.PDF
                }                
                ).ToList();            
        }

Open in new window

LINQ QueryASP.NET

Avatar of undefined
Last Comment
Fernando Soto

8/22/2022 - Mon
ITsolutionWizard

ASKER
Anyone can help?
Fernando Soto

What does the value in the parameter str represent? You state in the question that str looks like this, 111,222,3333, is that three different CarrierProductID which you want to filter out all but these? Or is that what the CarrierProductID looks like in the database?
ASKER CERTIFIED SOLUTION
Fernando Soto

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ITsolutionWizard

ASKER
I will check but look like it is working by just a quick look.
Regardless, really appreciate your helps in the weekend
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Fernando Soto

Did this work for you?
Fernando Soto

Author of the question stated that it looked like it is working but wanted to do more testing. Never came back so it must be working.