Code Added for GetEventsWithDetail at database layer