views:

38

answers:

0

i have the following working query in mysql...

select * from events e join performance_times pt on e.id = pt.event_id 
where pt.performance_date_only > '2010-08-10 00:00:00' 
group by pt.performance_date_only

I am having issues getting the group by to work when using this with my edmx file in my mvc app.

I have it working with the join, just the group by is confusing me. here is what i have for this...

_eventList = (from e in db.events
  join pt in db.performance_times on e.id equals pt.event_id
  where e.live == 1 && e.type == EventType.id && pt.performance_date >= DteFrom && pt.performance_date <= DteTo
  orderby pt.performance_date ascending
  select new ListingObject { 
   EventDate = (DateTime)pt.performance_date,
   EventID = e.id,
   EventDescription = e.description,
   EventImage = e.image,
   EventTitle = e.title
  }).ToList();

any help greatly appreciated as im tearing my hair out