mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 18:22:11 +08:00
fix issue #I7A7XF 全面支持SqlSugar Orm。详情:http://doc.openauth.net.cn/core/sqlsugar.html
This commit is contained in:
@@ -185,6 +185,11 @@ namespace OpenAuth.WebApi
|
||||
DbType = SqlSugar.DbType.SqlServer,
|
||||
ConnectionString = connectionString,
|
||||
IsAutoCloseConnection = true,
|
||||
},db=>{
|
||||
db.Aop.OnLogExecuting = (sql, pars) =>
|
||||
{
|
||||
logger.LogInformation(sql);
|
||||
};
|
||||
});
|
||||
}
|
||||
else if(dbtypes.ContainsValue(Define.DBTYPE_MYSQL)) //mysql
|
||||
@@ -194,6 +199,11 @@ namespace OpenAuth.WebApi
|
||||
DbType = SqlSugar.DbType.MySql,
|
||||
ConnectionString = connectionString,
|
||||
IsAutoCloseConnection = true,
|
||||
},db=>{
|
||||
db.Aop.OnLogExecuting = (sql, pars) =>
|
||||
{
|
||||
logger.LogInformation(sql);
|
||||
};
|
||||
});
|
||||
}
|
||||
else if(dbtypes.ContainsValue(Define.DBTYPE_PostgreSQL)) //PostgreSQL
|
||||
@@ -203,6 +213,11 @@ namespace OpenAuth.WebApi
|
||||
DbType = SqlSugar.DbType.PostgreSQL,
|
||||
ConnectionString = connectionString,
|
||||
IsAutoCloseConnection = true,
|
||||
},db=>{
|
||||
db.Aop.OnLogExecuting = (sql, pars) =>
|
||||
{
|
||||
logger.LogInformation(sql);
|
||||
};
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -212,6 +227,11 @@ namespace OpenAuth.WebApi
|
||||
DbType = SqlSugar.DbType.Oracle,
|
||||
ConnectionString = connectionString,
|
||||
IsAutoCloseConnection = true,
|
||||
},db=>{
|
||||
db.Aop.OnLogExecuting = (sql, pars) =>
|
||||
{
|
||||
logger.LogInformation(sql);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user