Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
1.36/5 (4 votes)
See more:
C#
var aa = db.LoanApplications.Select(b => b.ApplicantId.ToString().Where(b.ApplicationNumber.ToString().Equals(ApplicationNumber)).ToList());
Posted
Updated 2-Oct-14 1:37am
v2
Comments
khurram ali lashari 2-Oct-14 6:02am    
Please Add More detail to your Question so that we can answer you question...

1 solution

Your code is syntactically incorrect.

C#
var aa = db.LoanApplications.Where(b => b.ApplicationNumber.ToString() == ApplicationNumber).Select(b => b.ApplicantId.ToString()).ToList(); 


My best advice for fluent LINQ is:
1. Apply your logical filter (ie .Where())
2. Apply your select, if any.
3. Apply your ordering ( ie .OrderBy())
4. Enumerate (.Single(), .First(), .ToList(), etc)
 
Share this answer
 
Comments
[no name] 2-Oct-14 11:40am    
5. I like your advice.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900