Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
How to add IDs from DB to an Array
Sbonga Mathobela
Mar 3 2017 5:16 AM
204
Reply
Hi all.
I need to select employeeID from tb_StaffMembers and put them in an Array.
here is my query:
var employIds = db.tb_staffMembers.Where(x => x.RoleId == 4).ToList().Select(x=>x.EmployeeId);
The query returns three IDs (2032, 2077, 2107) of which is correct.
now i want them in an array like : int [] array = new int[]{}
Please help.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Get each value from temp table without cursor
how to change gridview column value in asp.net