mirror of
https://github.com/anjoy8/Blog.Core.git
synced 2025-02-08 02:39:26 +08:00
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
1、安装环境
1、必须安装 .NetCore SDK 3.1.x 版本
2、开发工具可以使用 VS2019+ 或者 VSCode
2、数据库生成
对应的文章介绍:
初始项目
修改数据库连接字符串
注意:目前支持 Sqlite、Sqlserver、Mysql、Oracle,如果想要开启指定的数据库,直接 Enabled 为 true 即可,
然后修改 MainDB 为指定的ID
1、在Blog.Core层 appsettings.json 中,配置自己的字符串
// 请配置MainDB为你想要的主库的ConnId值,并设置对应的Enabled为true;
// *** 单库操作,把 MutiDBEnabled 设为false ***;
// *** 多库操作,把 MutiDBEnabled 设为true,其他的从库也为true **;
"MainDB": "WMBLOG_MSSQL", //当前项目的主库,所对应的连接字符串的Enabled必须为true
"MutiDBEnabled": false, //是否开启多库
"DBS": [
/*
MySql = 0,
SqlServer = 1,
Sqlite = 2,
Oracle = 3,
PostgreSQL = 4
*/
{
"ConnId": "WMBLOG_SQLITE",
"DBType": 2,
"Enabled": true,
"Connection": "WMBlog.db" //只写数据库名就行,我会拼接字符串
},
{
"ConnId": "WMBLOG_MSSQL",
"DBType": 1,
"Enabled": true,
"Connection": "Server=.;Database=WMBlogDB;User ID=sa;Password=123;",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMBLOG_MYSQL",
"DBType": 0,
"Enabled": true,
"Connection": "Server=localhost; Port=3306;Stmt=; Database=wmblogdb; Uid=root; Pwd=456;"
},
{
"ConnId": "WMBLOG_ORACLE",
"DBType": 3,
"Enabled": false,
"Connection": "Provider=OraOLEDB.Oracle; Data Source=WMBlogDB; User Id=sss; Password=789;",
"OracleConnection_other1": "User ID=sss;Password=789;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.8.65)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME = orcl)))"
}
],
3、生成自己的项目
具体请参考这个 wiki:Temple-Nuget
入门指南
-
- AOP
- Appsettings
- Async-Await
- Authorization-Ids4
- Authorization-JWT
- AutoMapper
- CORS
- DI-AutoFac
- DI-NetCore
- Filter
- GlobalExceptionsFilter
- HttpContext
- Log4
- MemoryCache
- Middleware
- MiniProfiler
- publish
- Redis
- Repository
- SeedData
- SignalR
- SqlSugar
- SqlSugar-Codefirst&DataSeed
- SqlSugar-SqlAOP
- Swagger
- T4
- Test-xUnit
- Temple-Nuget
前端项目
交流与反馈
- FAQ page is a good place to see whether your question is already asked.
- Ask a question in cnblogs if you need help.
- Submit an issue if you found a bug or have a feature request.
- Open a pull request when you prepared to contribute. Before that, it is encouraged to open an issue to discuss.
更新日志
有疑问,请自行查看博客园文章:https://www.cnblogs.com/laozhang-is-phi/p/9495618.html#autoid-1-0-0
或者加 QQ 群:867095512