How to get Count of value of nested object by linq

Viewed 2019

Can anyone please suggest how to get the sum of points from all the Event objects by using linq.

new Category
{
     CategoryId = "NUTR",
     CategoryName = "NUTR",
     CategoryDescription = "NUTR Desc",
     TotalPoints = "100",
     Events = new List<Event>
           {
             new Event{Firstname = "HELEN",Surname = "BECKETT", 
                 Points = "10", Description = "NUTR Desc",Eventdate = "2013/04/19",EntityNumber = "1203206956"},
             new Event{Firstname = "PAUL",Surname = "BECKETT", 
                 Points = "90", Description = "NUTR Desc",Eventdate = "2013/06/19",EntityNumber = "1203206957"}
           }
}
2 Answers
Related