0

This is my sql query, ,

   select ROW_NUMBER() over (partition by AirAvail_ID order by AirAvail_ID) as IndexNo,AirAvail_ID from AvailFlt

I would like to convert this to LINQ!

O/P:

  IndexNo    AirAvail_Id
    1             0
    2             0
    3             0
    4             0
    1             1
    2             1
    3             1
    .             .
    .             .
    .             

Thanks in Advance

Zeeju
  • 13
  • 12
  • Possible duplicate of [How To Project a Line Number Into Linq Query Results](https://stackoverflow.com/questions/365086/how-to-project-a-line-number-into-linq-query-results) – Vahid Farahmandian Jun 10 '19 at 15:56

1 Answers1

0

Here is a post on how to project a line number into linq query results

The optimal solution adds the row number on the client side rather than the database side.

Community
  • 1
  • 1
VGruenhagen
  • 1,487
  • 15
  • 28
  • it's not working, can you convert the above query to LINQ?. i'm going to use the linq in vb.net, – Zeeju May 23 '13 at 08:52