コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: PostController.cs プロジェクト: DeBugger95/BlogCore
 public PostController(Blog_L2Context blogContext, IMapper mapper, IConfiguration configuration, IMemoryCache memoryCache) : base(blogContext, mapper, configuration, memoryCache)
 {
 }
コード例 #3
0
ファイル: GetInfo.cs プロジェクト: DeBugger95/BlogCore
 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();
 }