/// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="baseDbContext">BaseDbContext</param>
 public GenericDbAccessor(GenericDbContext baseDbContext)
 {
     _db       = baseDbContext;
     _provider = DbFactory.GetProvider(DbType);
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dbContext"></param>
 public GenericDbContext(GenericDbContext dbContext)
     : this(dbContext.DbContextOption, dbContext.Paramter, dbContext.ShardingOption)
 {
 }
 /// <summary>
 /// 获取数据库接口
 /// </summary>
 /// <param name="baseDbContext">DbContext</param>
 /// <returns></returns>
 public abstract IDbAccessor GetDbAccessor(GenericDbContext baseDbContext);