CVSolution.SqlSugarExtension
1.0.0-pre4
This is a prerelease version of CVSolution.SqlSugarExtension.
dotnet add package CVSolution.SqlSugarExtension --version 1.0.0-pre4
NuGet\Install-Package CVSolution.SqlSugarExtension -Version 1.0.0-pre4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CVSolution.SqlSugarExtension" Version="1.0.0-pre4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CVSolution.SqlSugarExtension" Version="1.0.0-pre4" />
<PackageReference Include="CVSolution.SqlSugarExtension" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CVSolution.SqlSugarExtension --version 1.0.0-pre4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CVSolution.SqlSugarExtension, 1.0.0-pre4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CVSolution.SqlSugarExtension@1.0.0-pre4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CVSolution.SqlSugarExtension&version=1.0.0-pre4&prerelease
#tool nuget:?package=CVSolution.SqlSugarExtension&version=1.0.0-pre4&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CVSolution.SqlSugarExtension
介绍
SqlSugar扩展
使用说明
- IOC注入
using CVSolution;
using CVSolution.SqlSugarExtension;
private AppConfig appConfig;
public void ConfigureServices(IServiceCollection services)
{
appConfig = ConfigTool.Instance.AddJsonFile<AppConfig>("AppConfig", false, true);
services.AddSqlSugar(appConfig.DBConfigs);
}
- AppConfig类属性
using CVSolution.SqlSugarExtension;
public class AppConfig
{
public List<DBConfig> DBConfigs { get; set; }
}
- Json配置内容
{
"DBConfigs": [
{
"DBName": "DB1", // Key(选择数据库时使用)
"DBType": 1, // 数据库类型(0:MySQL,1:SQL Server)
"DBConnStr": "Password={密码};Persist Security Info=True;User ID={用户名};Initial Catalog={数据库名称};Data Source={IP地址}" // 数据库连接字符串
},
{
"DBName": "DB2", // Key(选择数据库时使用)
"DBType": 0, // 数据库类型(0:MySQL,1:SQL Server)
"DBConnStr": "server={IP地址};port={端口};user id={用户名};password={密码};database={数据库名称};SslMode=none;Pooling=false;persist security info=true;Connect Timeout=3000;Convert Zero Datetime=True;Allow Zero Datetime=True;AllowLoadLocalInfile=True;" // 数据库连接字符串
}
],
}
- 相关方法(有空在写)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- CVSolution (>= 1.0.0-pre8)
- SqlSugarCore (>= 5.1.4.158)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0-pre4 | 90 | 6/13/2024 |
1.0.0-pre3 | 89 | 2/20/2024 |
1.0.0-pre2 | 90 | 9/21/2023 |
1.0.0-pre1 | 84 | 4/16/2024 |