예제 #1
0
 public AlbumsController(QNZContext context, IMapper mapper, IWebHostEnvironment hostingEnvironment, ICacheService cacheService)
 {
     _context            = context;
     _mapper             = mapper;
     _hostingEnvironment = hostingEnvironment;
     _cacheService       = cacheService;
 }
예제 #2
0
 public ProductsController(QNZContext context, IMapper mapper, IConfiguration config, IWritableOptions <AdminProductSet> writableLocations)
 {
     _context           = context;
     _mapper            = mapper;
     _config            = config;
     _writableLocations = writableLocations;
 }
예제 #3
0
 public DocumentsController(QNZContext context, IMapper mapper, ICacheService cacheService, IWebHostEnvironment hostingEnvironment)
 {
     _mapper             = mapper;
     _context            = context;
     _cacheService       = cacheService;
     _hostingEnvironment = hostingEnvironment;
 }
예제 #4
0
        protected async Task CreatedUpdatedPageMetaAsync(QNZContext db, PageMeta pm)
        {
            var origin = await db.PageMetas.FirstOrDefaultAsync(d => d.ModuleType == pm.ModuleType && d.ObjectId == pm.ObjectId);

            if (origin != null)
            {
                if (string.IsNullOrEmpty(pm.Title) && string.IsNullOrEmpty(pm.Keywords) && string.IsNullOrEmpty(pm.Description))
                {
                    db.Remove(origin);
                }
                else
                {
                    origin.Title       = pm.Title;
                    origin.Keywords    = pm.Keywords;
                    origin.Description = pm.Description;

                    db.Entry(origin).State = EntityState.Modified;
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(pm.Title) || !string.IsNullOrEmpty(pm.Keywords) || !string.IsNullOrEmpty(pm.Description))
                {
                    db.Add(pm);
                }
            }

            await db.SaveChangesAsync();
        }
예제 #5
0
 public WebpartsController(IWebHostEnvironment hostingEnvironment, QNZContext context, IMapper mapper, IConfiguration config)
 {
     _hostingEnvironment = hostingEnvironment;
     _context            = context;
     _mapper             = mapper;
     _config             = config;
 }
예제 #6
0
 public ErrorLogsController(QNZContext context,
                            IMapper mapper, IConfiguration config, IWritableOptions <SiteLogSet> writableLocations)
 {
     _context           = context;
     _mapper            = mapper;
     _config            = config;
     _writableLocations = writableLocations;
 }
예제 #7
0
 public UserController(IUserServices userServices, IRoleServices roleServices,
                       IMapper mapper, QNZContext context)
 {
     _userServices = userServices;
     _roleServices = roleServices;
     _mapper       = mapper;
     _context      = context;
 }
예제 #8
0
 public HomeController(/*IViewRenderService viewRenderService,*/ IWebHostEnvironment hostingEnvironment, ICacheService cache, QNZContext context, IMapper mapper)
 {
     _hostingEnvironment = hostingEnvironment;
     _cacheService       = cache;
     _context            = context;
     _mapper             = mapper;
     _fileProvider       = hostingEnvironment.WebRootFileProvider;
     // _viewRenderService = viewRenderService;
 }
예제 #9
0
 public NavigationController(IMenuServices menuService, IViewRenderService viewRenderService, IMapper mapper,
                             QNZContext context, ICacheService memoryCache)
 {
     _menuService       = menuService;
     _viewRenderService = viewRenderService;
     _mapper            = mapper;
     _context           = context;
     _cache             = memoryCache;
 }
예제 #10
0
 public MenuController(IMenuServices menuService, IMenuCategoryServices menuCategoryService, IMapper mapper,
                       QNZContext context, ICacheService memoryCache)
 {
     _menuService         = menuService;
     _menuCategoryService = menuCategoryService;
     //_viewRenderService = viewRenderService;
     _mapper  = mapper;
     _context = context;
     _cache   = memoryCache;
 }
예제 #11
0
 public PermissionHandler(IHttpContextAccessor httpContextAccessor, /*IMenuServices menuServices*/ QNZContext db, ILoggerFactory loggerFactory)
 {
     _db = db;
     _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
     _logger = loggerFactory.CreateLogger(this.GetType().FullName);
 }
예제 #12
0
 public MenuCategoryServices(QNZContext db)
 {
     _db = db;
 }
예제 #13
0
 public WorkController(QNZContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
예제 #14
0
 public ExhibitionsController(QNZContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
예제 #15
0
 public MoveNavComponent(QNZContext context)
 {
     _context = context;
 }
예제 #16
0
 public PageSubNavComponent(QNZContext context, ICacheService cacheService)
 {
     _cacheService = cacheService;
     _context      = context;
 }
예제 #17
0
 public ArticlesController(QNZContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
예제 #18
0
 public HomeController(QNZContext context)
 {
     _context = context;
 }
예제 #19
0
 public MemorabiliumController(IWebHostEnvironment hostingEnvironment, QNZContext context, IMapper mapper)
 {
     _hostingEnvironment = hostingEnvironment;
     _context            = context;
     _mapper             = mapper;
 }
예제 #20
0
 public ArticlesController(QNZContext context)
 {
     _context = context;
 }
예제 #21
0
 public PostCategoriesComponent(QNZContext context)
 {
     _context = context;
 }
예제 #22
0
 public PhotosController(QNZContext context, IMapper mapper, ICacheService cacheService)
 {
     _cacheService = cacheService;
     _context      = context;
     _mapper       = mapper;
 }
 public AdvertisingSpacesController(QNZContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
예제 #24
0
 public MenuServices(QNZContext db)
 {
     _db = db;
 }
예제 #25
0
 public JobCategoriesController(QNZContext context, IMapper mapper, IWebHostEnvironment hostingEnvironment)
 {
     _context            = context;
     _mapper             = mapper;
     _hostingEnvironment = hostingEnvironment;
 }
예제 #26
0
 public AdvertisementsController(QNZContext context, IMapper mapper, ICacheService cacheService)
 {
     _context      = context;
     _mapper       = mapper;
     _cacheService = cacheService;
 }
예제 #27
0
 public ContactController(QNZContext context, IMapper mapper, IEmailService emailService)
 {
     _context      = context;
     _mapper       = mapper;
     _emailService = emailService;
 }
예제 #28
0
 public SearchController(QNZContext context, IMapper mapper, ICacheService cacheService)
 {
     _mapper       = mapper;
     _context      = context;
     _cacheService = cacheService;
 }
예제 #29
0
 public NavListComponent(QNZContext context, ICacheService memoryCache)
 {
     _context = context;
     _cache   = memoryCache;
 }
예제 #30
0
 public RolesController(IMapper mapper, QNZContext context, ICacheService memoryCache)
 {
     _context = context;
     _mapper  = mapper;
     _cache   = memoryCache;
 }