Ejemplo n.º 1
0
        private static void PreventOverGrowth(IRequestLoggerService requestLoggerService)
        {
            if (requestLoggerService.Find().Count() < RequestLoggerServiceExtension.MaxLogCount)
            {
                return;
            }
            var last = requestLoggerService.Find().OrderBy(z => z.Datetime).FirstOrDefault();

            if (last != null)
            {
                requestLoggerService.Remove(last);
            }
        }
Ejemplo n.º 2
0
 public IEnumerable <RequestLog> Get()
 {
     return(_requestLoggerService.Find().OrderByDescending(z => z.Datetime));
 }