Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 528.9k

Linq Query

May 30 2022 3:00 PM

Hi

  I have value in textbox 7. What should be the linq query

From      TO

2             4

5             7

8             10

Record 2 should be returned

var Result = (from t in context.Groups
                          where t.FromAge >= Age && t.ToAge <= Age
                          select t.ID).FirstOrDefault();

Thanks


Answers (3)