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
Istudent Rana
1.4k
342
84k
how do i create new object out of list of object using linq
Apr 1 2020 10:56 AM
I do have a list of employee objects which can be 'group by' by employee id.
List<EmployeeHour> employeeHours = new List<EmployeeHour>
{
new EmployeeHour{Id = 1, EmployeeName = "Emp1", Day = 1, Hours = 6},
new EmployeeHour{Id = 1, EmployeeName = "Emp1", Day = 2, Hours = 8},
new EmployeeHour{Id = 2, EmployeeName = "Emp2", Day = 1, Hours = 6},
new EmployeeHour{Id = 2, EmployeeName = "Emp2", Day = 2, Hours = 8}
};
I want to create list of object something like
new {
Id = 1,
EmplyeeName = Emp1,
Day1 = 6,
Day2 = 8
},
new {
Id = 2,
EmplyeeName = Emp2,
Day1 = 6,
Day2 = 8
}
Reply
Answers (
5
)
max pool size was reached
Make Json String C#