Exemplo n.º 1
0
        public IEnumerable <CalendarEventDTO> GetCalendarEvents()
        {
            try
            {
                log.Debug("GetCalendarEvents");

                // get
                IEnumerable <R_CalendarEvent> results = Repository.GetCalendarEvents();

                IEnumerable <CalendarEventDTO> resultsDTO = results.Select(e => new CalendarEventDTO(e));

                log.Debug("result: 'success', count: " + (resultsDTO != null ? resultsDTO.Count().ToString() : "null"));

                return(resultsDTO);
            }
            catch (System.Exception e)
            {
                // error
                log.Error(e.ToString());

                throw;
            }
        }