ITsolutionWizard
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?
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();
}
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will check but look like it is working by just a quick look.
Regardless, really appreciate your helps in the weekend
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.
ASKER