mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58:01 +08:00
修复Oracle查询带引号
This commit is contained in:
@@ -35,7 +35,8 @@ namespace OpenAuth.App
|
||||
|
||||
public T Get(string id)
|
||||
{
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL
|
||||
|| SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle)
|
||||
{
|
||||
return SugarClient.Queryable<T>().Where("\"Id\"=@id", new {id = id}).First();
|
||||
}
|
||||
|
@@ -85,7 +85,8 @@ namespace OpenAuth.App
|
||||
}
|
||||
|
||||
var columnnames = columnFields.Select(u => u.ColumnName);
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL
|
||||
|| SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle)
|
||||
{
|
||||
columnnames = columnFields.Select(u => "\"" + u.ColumnName +"\"");
|
||||
}
|
||||
|
@@ -41,7 +41,8 @@ namespace OpenAuth.App
|
||||
}
|
||||
|
||||
var columnnames = columnFields.Select(u => u.ColumnName);
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL
|
||||
|| SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle)
|
||||
{
|
||||
columnnames = columnFields.Select(u => "\"" + u.ColumnName +"\"");
|
||||
}
|
||||
|
Reference in New Issue
Block a user