We help IT Professionals succeed at work.

linq, aspx

ITsolutionWizard
on
116 Views
Last Modified: 2018-05-22
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

Comment
Watch Question

Author

Commented:
Anyone can help?
Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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?
Retired
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I will check but look like it is working by just a quick look.
Regardless, really appreciate your helps in the weekend
Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Did this work for you?
Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.