Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag 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

Avatar of ITsolutionWizard
ITsolutionWizard
Flag of United States of America image

ASKER

Anyone can help?
Avatar of 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
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will check but look like it is working by just a quick look.
Regardless, really appreciate your helps in the weekend
Did this work for you?
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.