-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
support db
ansonzhang edited this page Dec 16, 2019
·
4 revisions
目前的单数据库,使用哪个,就把哪个Db 的 Enabled 设置为 true,其他的设置为 false。
appsettings.json 中配置:
"Sqlite": {
"Enabled": true,
"SqliteConnection": "WMBlog.db"//只写数据库名就行,我会拼接字符串
},
appsettings.json 中配置:
"SqlServer": {
"Enabled": true,
"SqlServerConnection": "Server=.;Database=WMBlogDB;User ID=sa;Password=123;",
"ProviderName": "System.Data.SqlClient"
},
appsettings.json 中配置:
"SqlServer": {
"Enabled": true,
"SqlServerConnection": "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=wm;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
appsettings.json 中配置:
"MySql": {
"Enabled": true,
"MySqlConnection": "Server=localhost; Port=3306;Stmt=; Database=wmblogdb; Uid=root; Pwd=456;"
},
有疑问,请自行查看博客园文章:https://www.cnblogs.com/laozhang-is-phi/p/9495618.html#autoid-1-0-0
或者加 QQ 群:867095512
-
- 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.