fix #I95QYW pg数据库,启动时提示表名不存在

This commit is contained in:
wintel
2024-03-09 10:33:24 +08:00
parent 37da0bcb00
commit 9cddee643a
3 changed files with 16 additions and 2 deletions

View File

@@ -35,6 +35,10 @@ namespace OpenAuth.App
public T Get(string id)
{
if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
{
return SugarClient.Queryable<T>().Where("\"Id\"=@id", new {id = id}).First();
}
return SugarClient.Queryable<T>().Where("Id=@id", new {id = id}).First();
}