public object Get(GetActivityLogs request) { DateTime?minDate = string.IsNullOrWhiteSpace(request.MinDate) ? (DateTime?)null : DateTime.Parse(request.MinDate, null, DateTimeStyles.RoundtripKind).ToUniversalTime(); var result = _activityManager.GetActivityLogEntries(minDate, request.StartIndex, request.Limit); return(ToOptimizedResult(result)); }
public object Get(GetActivityLogs request) { DateTime?minDate = string.IsNullOrWhiteSpace(request.MinDate) ? (DateTime?)null : DateTime.Parse(request.MinDate, null, DateTimeStyles.RoundtripKind).ToUniversalTime(); var filterFunc = new Func <IQueryable <ActivityLog>, IQueryable <ActivityLog> >( entries => entries.Where(entry => entry.DateCreated >= minDate)); var result = _activityManager.GetPagedResult(filterFunc, request.StartIndex, request.Limit); return(ToOptimizedResult(result)); }