Exemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="conString">构造参数,可以为数据库连接字符串或者DbContext</param>
 /// <param name="dbType">数据库类型</param>
 public DbRepository(string conString, DatabaseType dbType)
 {
     ConnectionString = conString;
     DbType           = dbType;
     _db = DbFactory.GetDbContext(conString, dbType);
 }