TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Waleed Al-akrabawe
NA
6
609
How to Add Row Number Column in Select query
Apr 24 2020 7:07 AM
Hello All ,
I have this query and i need to add Row Number Column i try this code but not correct ,
int count = 0;
var SourceIDS = (from main in db.RiskSources
join subCat in db.SubCategories on main.SubCategoryID equals subCat.ID
join description in db.Descriptions on main.DescriptionID equals description.ID
where Configrations.Any(a => a.sub_category_Id == main.SubCategoryID && a.category_Id == main.CategoryID)
select new
{
RiskSourceID = main.RiskSourceID,
No = ++count ,
status_record = "",
subCat_Name = subCat.Name,
description_Name = description.Name,
}).ToList();
Reply
Answers (
1
)
How to copy one list to another list using linq?
query in partial classes