Hi
IN below query there r 2 records in View_Header . but it shows 0 in tt. In below query i wants to add where Clause also.
C#
List tt = new List();
tt.Select(x => new { x.ID, x.Name }).ToList();Thanks
Hi
IN below query there r 2 records in View_Header . but it shows 0 in tt. In below query i wants to add where Clause also.
List tt = new List();
tt.Select(x => new { x.ID, x.Name }).ToList();Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 16, 2022, 5:16 AM EDT
Jagjit SainiRank #6,453 · 266 reputationPosted Mar 16, 2022, 5:20 AM EDT
Hi Jignesh
Below is the code. I want to list only 2 columnc
public List GetList()
{
List Result = (from t in context.View_Headers
where t.IsActive == true
select t).ToList();
return Result;
}
Thanks
Jagjit SainiRank #6,453 · 266 reputationPosted Mar 16, 2022, 5:38 AM EDT
Muhammad Imran AnsariRank #326 · 7.6K reputationPosted Mar 16, 2022, 5:36 AM EDT