Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Row number in linq query

$
0
0

How can I add a row number column to the following query:

var query = from u in dbReport.Users
                        join p in dbReport.Physicans on u equals p.User
                        select new
                        {
                            u.Id,
                            u.FirstName,
                            u.LastName,
                            u.UserName,
                            u.Password,
                            BirthDate = u.DOB,
                            u.Sex,
                            u.Mobile,
                            u.Image,
                            p.Specialty
                        }



Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>