protected BaseController(Blog_L2Context blogContext, IMapper mapper, IConfiguration configuration, IMemoryCache memoryCache) { _db = blogContext; _configuration = configuration; _hotPostSize = Convert.ToInt32(_configuration.GetSection("Value:HotPostSize").Value); _latestPostSize = Convert.ToInt32(_configuration.GetSection("Value:LatestPostSize").Value); _correlationPostSize = Convert.ToInt32(_configuration.GetSection("Value:CorrelationPostSize").Value); _stochasticPostSize = Convert.ToInt32(_configuration.GetSection("Value:StochasticPostSize").Value); _mapper = mapper; _cache = memoryCache; }
public PostController(Blog_L2Context blogContext, IMapper mapper, IConfiguration configuration, IMemoryCache memoryCache) : base(blogContext, mapper, configuration, memoryCache) { }
public GetInfo(Blog_L2Context blogContext, IConfiguration configuration, IMemoryCache memoryCache) : base(blogContext, null, configuration, memoryCache) { _queryPosts = _db.Post.AsNoTracking().Where(u => u.IsActive == true); _listFiles = _db.File.AsNoTracking().ToList(); }