mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
fix issue #I7A7XF 全面支持SqlSugar Orm。详情:http://doc.openauth.net.cn/core/sqlsugar.html
This commit is contained in:
parent
331bc9d042
commit
f3f575a72b
@ -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);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
|
||||
* @Date: 2023-08-12 10:48:24
|
||||
* @LastEditTime: 2023-08-27 19:45:48
|
||||
* @Description:
|
||||
* @
|
||||
* @Copyright (c) 2023 by yubaolee | ahfu~ , All Rights Reserved.
|
||||
*/
|
||||
module.exports = {
|
||||
title: 'OpenAuth.Net',
|
||||
description: '最好用的.net权限工作流框架,最好用的.net vue前后分离框架',
|
||||
@ -45,7 +53,7 @@ module.exports = {
|
||||
ariaLabel: 'Proj Menu',
|
||||
items: [{
|
||||
text: 'gitee',
|
||||
link: 'https://gitee.com/yubaolee/OpenAuth.Core',
|
||||
link: 'https://gitee.com/dotnetchina/OpenAuth.Net',
|
||||
target: '_blank'
|
||||
},
|
||||
{
|
||||
@ -74,7 +82,7 @@ module.exports = {
|
||||
path: 'start', // 可选的, 标题的跳转链接,应为绝对路径且必须存在
|
||||
sidebarDepth: 1, // 可选的, 默认值是 1
|
||||
collapsable: false,
|
||||
children: ['start', 'specialist', 'deploy', 'deployapi', 'devnew', 'multidbs', 'multitenant', 'unitwork', 'entity', 'datavalidation', 'log', 'identity', 'job', 'cache', 'unittest'],
|
||||
children: ['start', 'specialist', 'deploy', 'deployapi', 'devnew', 'multidbs', 'multitenant', 'unitwork','sqlsugar', 'entity', 'datavalidation', 'log', 'identity', 'job', 'cache', 'unittest'],
|
||||
},
|
||||
{
|
||||
title: '权限控制', // 必要的
|
||||
|
@ -17,7 +17,7 @@ features:
|
||||
- title: 功能强大
|
||||
details: 组织机构、角色用户、数据权限、拖拽表单、工作流引擎、定时任务。
|
||||
- title: 主流技术
|
||||
details: IdentityServer、EF core、Quartz、AutoFac、WebAPI、Swagger、Mock、NUnit、VUE、Element-ui。
|
||||
details: IdentityServer、EF、SqlSugar、Quartz、AutoFac、WebAPI、Swagger、Mock、NUnit、VUE2、VUE3、Element-ui、Element-plus。
|
||||
footer: Copyright © 2023- yubaolee
|
||||
---
|
||||
|
||||
|
@ -47,7 +47,7 @@ source /etc/profile
|
||||
|
||||
## jenkins部署OpenAuth.Mvc
|
||||
|
||||
OpenAuth.Core采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下:
|
||||
OpenAuth.Net采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下:
|
||||
|
||||

|
||||
|
||||
|
@ -46,7 +46,7 @@ source /etc/profile
|
||||
|
||||
## jenkins部署OpenAuth.WebApi
|
||||
|
||||
OpenAuth.Core采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下:
|
||||
OpenAuth.Net采用的是gitee托管源码,只需使用Gitee WebHook构建触发器。配置如下:
|
||||
|
||||

|
||||
|
||||
|
@ -43,7 +43,7 @@ b => b.UseRowNumberForPaging());
|
||||
即使用rownumber的分页方式。 当然最好的解决方式是升级SQL SERVER到2012或以上版本。
|
||||
|
||||
::: warning 注意
|
||||
OpenAuth.Core 2.0及以后版本因为使用了.net core 3.1,该SDK已经放弃了这种方式,因此只能通过升级Sql Server的方式解决该问题
|
||||
目前.Net的SDK已经放弃了这种方式,因此只能通过升级Sql Server的方式解决该问题
|
||||
:::
|
||||
|
||||
|
||||
|
@ -82,12 +82,8 @@ OpenAuth.Repository -> OpenAuthDB : 仓储层进行数据库操作
|
||||
|
||||
## 打开项目
|
||||
|
||||
使用Visual Studio 2019或Rider打开 `OpenAuth.Core.sln`
|
||||
使用Visual Studio或Rider打开 `OpenAuth.Net.sln`
|
||||
::: tip 提示
|
||||
v2.0及以后版本因使用.net core 3.1,必须使用visual Studio 2019及以上版本打开
|
||||
|
||||
v2.0以前的版本可以使用visual Studio 2017
|
||||
|
||||
如果开发使用的电脑安装有多个版本的SDK(如同时有.net core 3.1 和.Net 5/6/7..),可以在根目录新建一个`global.json`文件来指定.net版本,文件内容如下:
|
||||
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 数据库读写及事务处理
|
||||
|
||||
OpenAuth.Core使用Repository和Unitwork两种方式访问数据库。
|
||||
OpenAuth.Net使用Repository和Unitwork两种方式访问数据库。
|
||||
|
||||
## 使用场景
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user