Ramco Ramco

Ramco Ramco

  • 440
  • 3.4k
  • 520.1k

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)