public IEnumerable <CalendarEventDTO> GetCalendarEventListAdvancedSearch( int?nucleoId , string name , string description , System.DateTime?startDateFrom , System.DateTime?startDateTo , System.DateTime?endDateFrom , System.DateTime?endDateTo , bool?active ) { try { log.Debug("GetCalendarEventListAdvancedSearch"); IEnumerable <R_CalendarEvent> results = Repository.GetCalendarEventListAdvancedSearch( nucleoId , name , description , startDateFrom , startDateTo , endDateFrom , endDateTo , active ); 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; } }