mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 23:13:40 +08:00
修复Oracle查询带引号
This commit is contained in:
parent
71b72ca06e
commit
e07d7e0cd2
@ -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 +"\"");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user