src/fursvp.api/Controllers/EventController.cs
/// <summary>
/// Retrieves details for all Events.
/// </summary>
/// <returns>A list of objects representing each Event.</returns>
Retrieves details for all Events.
Retrieves details for all Events .
[HttpGet]
        public async Task<List<EventResponse>> GetUpcomingEvents()
        {
            var allEvents = await EventRepositoryRead.GetAll().ConfigureAwait(false);
            return allEvents
                .Where(x => !x.IsPublished || x.EndsAtUtc > DateTimeProvider.Now)
                .OrderBy(x => x.StartsAtUtc)
                .Select(x => Mapper.MapResponse(x, DateTimeProvider))
                .ToList();
        }
[ HttpGet ] public async Task < List < EventResponse > > GetUpcomingEvents ( ) { var allEvents = await EventRepositoryRead . GetAll ( ) . ConfigureAwait ( false ) ; return allEvents . Where ( x => ! x . IsPublished || x . EndsAtUtc > DateTimeProvider . Now ) . OrderBy ( x => x . StartsAtUtc ) . Select ( x => Mapper . MapResponse ( x , DateTimeProvider ) ) . ToList ( ) ; }
Retrieves details for all Events.
Retrieves details for all Events .
A list of objects representing each Event.
A list of objects representing each Event .