コード例 #1
0
 public NeighbourhoodController(
     IConfigurationRoot config,
     DbContextOptionsWrapper dbOptns,
     InjectorObjectHolder injHolder)
     : base(config, dbOptns, injHolder)
 {
 }
コード例 #2
0
 public AccountManagementController(
     IConfigurationRoot config,
     DbContextOptionsWrapper dbOptns,
     InjectorObjectHolder injHolder)
     : base(config, dbOptns, injHolder)
 {
 }
コード例 #3
0
        public BaseController(
            IConfigurationRoot config,
            DbContextOptionsWrapper dbOptns,
            InjectorObjectHolder injHolder)
        {
            _config = config;

            _injHolder = injHolder;

            if (dbOptns != null)
            {
                dbOptns.GetConnectionString = this.GetConnectionString;
                _dbi = new AppDbInteractor(new AppDbContext(dbOptns), GetAccessTokenValue);
            }

            if (_injHolder != null && _dbi != null)
            {
                object temp = _injHolder.GetObject("ConnToken");

                temp = Helper.JSonCamelDeserializeObject <LoginConnectionToken>(temp);

                if (temp != null)
                {
                    _dbi.ConnToken = (LoginConnectionToken)temp;

                    temp = null;
                }
            }
        }
コード例 #4
0
 public ProductsController(
     IConfigurationRoot config,
     DbContextOptionsWrapper dbOptns,
     InjectorObjectHolder injHolder)
     : base(config, dbOptns, injHolder)
 {
 }
        public AccessRequirementHandler(
            IHostingEnvironment env,
            IConfigurationRoot config,
            DbContextOptionsWrapper dbOptnsWrapper,
            InjectorObjectHolder injHolder)
        {
            _env            = env;
            _config         = config;
            _dbOptnsWrapper = dbOptnsWrapper;
            _injHolder      = injHolder;

            if (_dbOptnsWrapper != null)
            {
                _dbOptnsWrapper.GetConnectionString = () => BaseController.GetConnectionString(_config);
            }
        }