注意:其中searchpath是架构,要改成你库中的架构名字
Server=27.151.1.54;Port=5866;UId=design;Password=000;Database=design;searchpath=design //常见错误 Unsupported command 特殊网络会出现 ConnectionString = "....Pooling=false",//加上禁用连接池
安装2个DLL

searchpath是架构名字
//程序启动时加入
InstanceFactory.CustomAssemblies =
new System.Reflection.Assembly[] { typeof(HGProvider).Assembly };
//创建DB对象
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
{
DbType = DbType.HG,
ConnectionString="Server=27.151.1;Port=5866;UId=design;Password=123;Database=design;searchpath=design",
IsAutoCloseConnection = true
});
//字符串中 searchpath是当前架构的名字 //程序启动时加入
InstanceFactory.CustomAssemblies =
new System.Reflection.Assembly[] { typeof(HGProvider).Assembly };
//创建DB对象
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
{
DbType = DbType.HG,
ConnectionString="Server=27.151.1;Port=5866;UId=design;Password=123;Database=design;searchpath=design",
IsAutoCloseConnection = true
});//程序启动时加入
InstanceFactory.CustomAssemblies =
new System.Reflection.Assembly[] { typeof(HGProvider).Assembly };
//创建DB对象
var db= new SqlSugarClient(new ConnectionConfig(){
DbType = SqlSugar.DbType.HG,
ConnectionString = Config.ConnectionString,
IsAutoCloseConnection = true,
MoreSettings= new ConnMoreSettings()
{
PgSqlIsAutoToLower = false,//增删查改支持驼峰表
PgSqlIsAutoToLowerCodeFirst = false, // 建表建驼峰表。5.1.3.30
}})需要升级SqlSugar.HGCore到172+
//常见错误 Unsupported command 特殊网络会出现 ConnectionString = "....Pooling=false",//加上禁用连接池
操作符不存在:oid = text
//执行下面存储过程可以解决 CREATE OR REPLACE FUNCTION oid_eq_text(oid,text) RETURNS Boolean AS $$ SELECT $1::text = $2::text $$ LANGUAGE sql; CREATE OPERATOR = ( leftarg = oid, rightarg = text, PROCEDURE = oid_eq_text);
2016 © donet5.comApache Licence 2.0