Esempio n. 1
0
        private Task Clean(WWWDbContext dbContext)
        {
            var toDeleteTime = DateTime.UtcNow - TimeSpan.FromDays(90);

            dbContext.SearchHistories.Delete(t => t.SearchTime < toDeleteTime);
            return(dbContext.SaveChangesAsync());
        }
Esempio n. 2
0
 public SearchController(
     SearchService searchService,
     WWWDbContext dbContext,
     AiurCache cahce)
 {
     _searchService = searchService;
     _dbContext     = dbContext;
     _cahce         = cahce;
 }
Esempio n. 3
0
 public SearchController(
     SearchService searchService,
     WWWDbContext dbContext,
     BingTranslator bingTranslator,
     AiurCache cache)
 {
     _searchService  = searchService;
     _dbContext      = dbContext;
     _bingTranslator = bingTranslator;
     _cache          = cache;
 }