private Task Clean(WWWDbContext dbContext) { var toDeleteTime = DateTime.UtcNow - TimeSpan.FromDays(90); dbContext.SearchHistories.Delete(t => t.SearchTime < toDeleteTime); return(dbContext.SaveChangesAsync()); }
public SearchController( SearchService searchService, WWWDbContext dbContext, AiurCache cahce) { _searchService = searchService; _dbContext = dbContext; _cahce = cahce; }
public SearchController( SearchService searchService, WWWDbContext dbContext, BingTranslator bingTranslator, AiurCache cache) { _searchService = searchService; _dbContext = dbContext; _bingTranslator = bingTranslator; _cache = cache; }