直接用PostgreSQL驱动就行了,看法看 PostgreSQL
SqlSugarClient(new ConnectionConfig() { DbType = SqlSugar.DbType.PostgreSQL, ConnectionString = Config.ConnectionString, IsAutoCloseConnection = true, MoreSettings=new ConnMoreSettings() { PgSqlIsAutoToLower=false //数据库存在大写字段的 ,需要把这个设为false ,并且实体和字段名称要一样 }, AopEvents = new AopEvents { OnLogExecuting = (sql, p) => { Console.WriteLine(sql); Console.WriteLine(string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value))); } } });
2016 © donet5.comApache Licence 2.0