Example #1
0
        // GET api/events
        public IEnumerable <events_day> Get(DateTime start_date, int skip = -1, int top = -1)
        {
            if (skip > 0)
            {
                start_date.AddDays(skip);
            }
            var end_date = start_date;

            if (top > 0)
            {
                end_date.AddDays(top);
            }

            var eventsGrouped = EventsHelper.GetEventsByDay(Context.Events, start_date, end_date);

            return(ToViewModel(eventsGrouped));
        }
Example #2
0
        // GET api/events
        public IEnumerable <events_day> Get(DateTime start_date, DateTime end_date)
        {
            var eventsGrouped = EventsHelper.GetEventsByDay(Context.Events, start_date, end_date);

            return(ToViewModel(eventsGrouped));
        }