I have a data list and I want to make an array of two columns like-
var array= dataList.Select(a => a.CustomerId, a.EmployerId).ToArray();
Please suggest what is the correct way to make a array of two or more columns in entity framework.
Update
I also tried following.
var array= dataList.Select(a => new { a.CustomerId, a.EmployerId }).ToArray();
This gives result as follows
But I need result as follows.
[0] 5145
[1] 5155
[2] 5146
[3] 5149
Thanks.
