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
Sbonga Mathobela
NA
68
7.4k
How to add IDs from DB to an Array
Mar 3 2017 5:16 AM
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.
Reply
Answers (
3
)
Get each value from temp table without cursor
FileNotFoundException unhandled error