Example #1
0
 public ShardAccessorBuilder()
 {
     ShardingDbContext.EnsureDbTypeReg(typeof(TDb));
 }
Example #2
0
        /// <summary>
        /// 创建DbCreater(主要用于子类调用,会确保Db的静态构造函数被调用-RegDb)
        /// </summary>
        protected ShardingDbCreater <T> DbCreater <T>() where T : ShardingDbContext
        {
            ShardingDbContext.EnsureDbTypeReg(typeof(T));

            return(GetComponent <ShardingDbCreater <T> >());
        }