There is an even simpler solution:
from s in services select new { s.Id, s.DateTime, Class = s.Class.Name, s.Location, s.Price, HeadCount = (int?)s.Reservations.Sum(r => r.PartySize), s.MaxSeats }
Pay attention to the cast. It can also lead to simpler SQL than @Ahmad's suggestion.
Essentially, you are just helping type inferences.
Craig stuntz
source share