Exemplo n.º 1
0
 public RetailSpuController(IDapperFactory dapperFactory,
                            IServices services)
 {
     _dapper   = dapperFactory.CreateClient();
     _services = services;
     _services.DapperClient = _dapper;
 }
Exemplo n.º 2
0
        public object Get()
        {
            var list   = new List <dynamic>();
            var _SqlDB = DapperFactory.CreateClient(EnumDBType.SqlServer);

            list.AddRange(_SqlDB.Query <dynamic>(@"select top 100 * from t_acl_user"));
            return(list);
        }
Exemplo n.º 3
0
        //public ActivityWebController(IDapperFactory dapperFactory, Sys_MenuService _menservice, ActivityService _service, IWebHostEnvironment _webHostEnvironment)
        ////: base("CAA298AC-104E-4D31-A303-08D7FBCAC280", _menservice, _service)
        //{
        //    this.webHostEnvironment = _webHostEnvironment;
        //    this.webRootPath = _webHostEnvironment.WebRootPath;
        //    //appsettings.json 和  Startup 下配置多个连接字符串
        //    //这样可以操作多个数据库
        //    dapper = dapperFactory.CreateClient("MSSQL1");
        //}

        public ActivityWebController(IDapperFactory dapperFactory, Sys_MenuService _menservice, ActivityService _service, IWebHostEnvironment _webHostEnvironment)
        {
            this.webHostEnvironment = _webHostEnvironment;
            this.webRootPath        = _webHostEnvironment.WebRootPath;
            //appsettings.json 和  Startup 下配置多个连接字符串
            //这样可以操作多个数据库
            dapper = dapperFactory.CreateClient("MSSQL1");
        }
 //todo
 //公司里要换 guid = CAA298AC - 104E-4D31-A303-08D7FBCAC280   DD9552F6-F439-47D8-6DE5-08D7FEE48E60
 /// <summary>
 ///
 /// </summary>
 /// <param name="dapperFactory"></param>
 /// <param name="_menservice"></param>
 /// <param name="_service"></param>
 /// <param name="_webHostEnvironment"></param>
 public ActivityController(IDapperFactory dapperFactory, Sys_MenuService _menservice, ActivityService _service, IWebHostEnvironment _webHostEnvironment)
     : base("997BBD74-DD6D-41A9-A304-08D7FBCAC280", _menservice, _service)
 {
     this.webHostEnvironment = _webHostEnvironment;
     this.webRootPath        = _webHostEnvironment.WebRootPath;
     //appsettings.json 和  Startup 下配置多个连接字符串
     //这样可以操作多个数据库
     dapper = dapperFactory.CreateClient("MSSQL1");
 }
Exemplo n.º 5
0
 public InterInviteController(IDapperFactory dapperFactory,
                              IWebHostEnvironment host,
                              IServices services)
 {
     _host     = host;
     _dapper   = dapperFactory.CreateClient();
     _services = services;
     _services.DapperClient = _dapper;
 }
        //private IDapper _dapper;

        //public ActivityWebService(IDapperFactory dapperFactory, IConfiguration configuration, DapperClient dapper)
        //{
        //    _configuration = configuration;
        //    //_factory = DapperFactory.GetInstance(configuration);
        //    _dapper = dapper;
        //}
        public ActivityWebService(IDapperFactory dapperFactory, EFCoreContext _db, DefaultRepository <Sys_User> _userDb)
            : base(_db)
        {
            this.userDb = _userDb;
            dapper      = dapperFactory.CreateClient("MSSQL1");
        }
 public MieShenEveryController(ICommonRespository _commonRespository, IDapperFactory dapperFactory)
 {
     CommonRespository = _commonRespository;
     _SqlDB            = dapperFactory.CreateClient("SqlDb");
 }
Exemplo n.º 8
0
 public OracleController(IDapperFactory dapperFactory)
 {
     _client = dapperFactory.CreateClient("OracleDB");
 }
 public MSSQLController(IDapperFactory dapperFactory)
 {
     _client = dapperFactory.CreateClient("MSSqlDB");
 }
Exemplo n.º 10
0
 public DBAccess(IDapperFactory dapperFactory)
 {
     _SqlDB = dapperFactory.CreateClient(dapperFactory.DBKey);
 }
Exemplo n.º 11
0
 public DTService(IDapperFactory dapperFactory)
 {
     _SqlDB = dapperFactory.CreateClient(dapperFactory.DBKey);
 }
Exemplo n.º 12
0
 public TestController(IDapperFactory dapperFactory)
 {
     //_OracleDB = dapperFactory.CreateClient("OracleConnection");
     _SqlDB = dapperFactory.CreateClient("YZFConnection");
 }
Exemplo n.º 13
0
        public TeacherController(SchoolsDBContext dbContext, IDapperFactory dapperFactory)
        {
            _dbContext = dbContext;

            _SqlDB = dapperFactory.CreateClient("SqlDb");
        }