Voy.DALBase 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Voy.DALBase --version 1.0.3
                    
NuGet\Install-Package Voy.DALBase -Version 1.0.3
                    
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="Voy.DALBase" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Voy.DALBase" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Voy.DALBase" />
                    
Project file
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 Voy.DALBase --version 1.0.3
                    
#r "nuget: Voy.DALBase, 1.0.3"
                    
#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 Voy.DALBase@1.0.3
                    
#: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=Voy.DALBase&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Voy.DALBase&version=1.0.3
                    
Install as a Cake Tool

使用方法:

using System.Data.Common;
DbConnection conn = new MySqlConnection("Server=XXX.XXX.XXX.XXX; Port=XXXX; Database=XXXX; Uid=XXXX; Pwd=XXXXXXXX; SslMode=Preferred;");
VDB vdb = new VDB(conn));

公共方法:

GetSQLString()	获取SQL语句。
GetParams()	获取SQL语句的参数。
Execute()	执行数据操作命令。
GetData()	执行数据查询命令。
ExecuteScalar()	执行标量查询命令。

Database(数据库):

1.创建数据库: vdb.CreateDatabase("DBName").Execute();
2.如果数据库不存在则创建:vdb.CreateDatabaseIfNotExist("DBName").Execute();
3.移除数据库:vdb.DropDatabase("DBName").Execute();
4.获取数据库里的表信息:vdb.GetDatabaseTables().GetData();

Table(数据表):

1.创建数据表:vdb.CreateTable<User>().Execute();
2.如果数据表不存在则创建:vdb.CreateTableIfNotExist<User>().Execute();
3.移除数据表:vdb.DropTable<User>().Execute();
4.清空数据表:vdb.TruncateTable<User>().Execute();
5.获取数据表结构:vdb.GetTableStructure<User>().GetData();

Data(数据):

1.插入数据:vdb.Insert<User>(u => new User { Name = "张三", Age = 30 }).Execute();
2.更新数据:vdb.Update<User>(u => new User { Name = "李四", Age = 40 }).Where(u => u.Name == "张三").Execute();
3.删除数据:vdb.Delete<User>().Where(u => u.Name == "李四").Execute();
4.查询单表数据:
    vdb.Select<User>(u => new { u.Id, u.Name })
    .Where(u => u.Name == "王五")
    .OrderBy(u => u.Age)
    .Page(1, 10).GetData();
5.查询多表数据:
    vdb.Select<User, Order>((u, o) => new { u.Id, u.Name, o.CreateTime })
    .LeftJoin((u, o) => o.UserId == u.Id)
    .Where((u, o) => u.Name == "王五")
    .OrderBy((u, o) => u.Age)
    .Page(1, 10).GetData();
6.function(函数):
    1.Avg

    2.Count

    3.Max

    4.Min

    5.Sum

    var v1 = vdb.Select<User>()
    .Sum(u => u.Age,)
    .Count(u => u.IsDeleted == 0)
    var result = v1.GetData();
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.5.9 158 8/21/2024
1.5.8 155 8/21/2024
1.5.7 165 8/20/2024
1.5.6 150 8/19/2024
1.5.5 143 8/19/2024
1.5.5-beta9 116 8/9/2024
1.5.5-beta8 82 8/8/2024
1.5.5-beta7 103 8/8/2024
1.5.5-beta6 96 8/7/2024
1.5.5-beta5 86 8/6/2024
1.5.5-beta4 88 8/6/2024
1.5.5-beta3 106 8/6/2024
1.5.5-beta2 83 8/5/2024
1.5.5-beta18 123 8/16/2024
1.5.5-beta17 123 8/16/2024
1.5.5-beta16 118 8/15/2024
1.5.5-beta15 134 8/15/2024
1.5.5-beta14 118 8/14/2024
1.5.5-beta13 119 8/12/2024
1.5.5-beta12 118 8/12/2024
1.5.5-beta11 123 8/12/2024
1.5.5-beta10 119 8/11/2024
1.5.5-beta1 72 7/31/2024
1.5.4 103 7/30/2024
1.5.3 112 7/28/2024
1.5.2 114 7/27/2024
1.5.1 113 7/26/2024
1.5.0 118 7/26/2024
1.4.0 117 7/26/2024
1.3.14 141 7/18/2024
1.3.13 127 7/15/2024
1.3.12 125 7/13/2024
1.3.12-beta9 112 6/29/2024
1.3.12-beta8 98 6/29/2024
1.3.12-beta7 112 6/27/2024
1.3.12-beta6 112 6/27/2024
1.3.12-beta5 103 6/26/2024
1.3.12-beta4 112 6/25/2024
1.3.12-beta3 107 6/25/2024
1.3.12-beta29 87 7/12/2024
1.3.12-beta28 102 7/11/2024
1.3.12-beta27 98 7/11/2024
1.3.12-beta26 117 7/8/2024
1.3.12-beta25 102 7/4/2024
1.3.12-beta24 93 7/4/2024
1.3.12-beta23 86 7/4/2024
1.3.12-beta22 95 7/4/2024
1.3.12-beta21 97 7/3/2024
1.3.12-beta20 91 7/3/2024
1.3.12-beta2 109 6/24/2024
1.3.12-beta19 101 7/3/2024
1.3.12-beta18 90 7/3/2024
1.3.12-beta17 94 7/3/2024
1.3.12-beta16 112 7/3/2024
1.3.12-beta15 97 7/3/2024
1.3.12-beta14 115 7/2/2024
1.3.12-beta13 97 7/2/2024
1.3.12-beta12 109 7/2/2024
1.3.12-beta11 114 7/2/2024
1.3.12-beta10 112 7/1/2024
1.3.12-beta1 116 6/23/2024
1.3.11 137 6/22/2024
1.3.11-beta9 166 6/20/2024
1.3.11-beta8 119 6/19/2024
1.3.11-beta7 121 6/19/2024
1.3.11-beta6 117 6/18/2024
1.3.11-beta5 105 6/18/2024
1.3.11-beta4 124 6/16/2024
1.3.11-beta3 127 6/16/2024
1.3.11-beta2 119 6/15/2024
1.3.11-beta12 117 6/22/2024
1.3.11-beta11 115 6/21/2024
1.3.11-beta10 114 6/20/2024
1.3.11-beta1 114 6/15/2024
1.3.10 123 6/7/2024
1.3.9 141 6/6/2024
1.3.9-beta1 103 6/5/2024
1.3.8 143 6/4/2024
1.3.7 134 6/4/2024
1.3.6 132 6/3/2024
1.3.6-beta5 110 6/2/2024
1.3.6-beta4 117 6/2/2024
1.3.6-beta3 113 6/2/2024
1.3.6-beta2 108 6/1/2024
1.3.6-beta1 117 5/26/2024
1.3.5 152 5/25/2024
1.3.4 151 5/24/2024
1.3.3 172 2/22/2024
1.3.3-beta1 123 2/2/2024
1.3.2 154 12/19/2023
1.3.2-beta4 112 12/18/2023
1.3.2-beta3 141 12/9/2023
1.3.2-beta2 109 12/9/2023
1.3.2-beta1 136 12/9/2023
1.3.1 209 11/3/2023
1.3.1-beta2 112 11/2/2023
1.3.1-beta1 121 10/31/2023
1.3.0 161 10/27/2023
1.3.0-beta8 121 10/27/2023
1.3.0-beta7 128 10/26/2023
1.3.0-beta6 134 10/26/2023
1.3.0-beta5 122 10/26/2023
1.3.0-beta4 115 10/25/2023
1.3.0-beta3 135 10/25/2023
1.3.0-beta2 144 10/18/2023
1.3.0-beta1 125 10/16/2023
1.2.5-beta7 145 10/12/2023
1.2.5-beta6 117 10/12/2023
1.2.5-beta5 122 10/12/2023
1.2.5-beta1 134 9/28/2023
1.2.4 165 9/21/2023
1.2.4-beta2 132 9/20/2023
1.2.4-beta1 116 9/17/2023
1.2.3 174 9/13/2023
1.2.2 189 8/28/2023
1.2.2-beta1 145 8/21/2023
1.2.1 183 8/8/2023
1.2.0 196 8/3/2023
1.1.7 217 7/24/2023
1.1.7-beta9 164 7/20/2023
1.1.7-beta8 167 7/20/2023
1.1.7-beta7 148 7/20/2023
1.1.7-beta6 156 7/19/2023
1.1.7-beta5 167 7/18/2023
1.1.7-beta4 148 7/18/2023
1.1.7-beta3 159 7/18/2023
1.1.7-beta2 154 7/17/2023
1.1.7-beta12 162 7/21/2023
1.1.7-beta11 162 7/21/2023
1.1.7-beta10 168 7/21/2023
1.1.7-beta1 172 7/14/2023
1.1.6 217 7/13/2023
1.1.6-beta9 159 7/12/2023
1.1.6-beta8 158 7/11/2023
1.1.6-beta7 148 7/11/2023
1.1.6-beta6 161 7/10/2023
1.1.6-beta5 170 7/7/2023
1.1.6-beta4 148 7/7/2023
1.1.6-beta3 157 7/7/2023
1.1.6-beta2 168 7/4/2023
1.1.6-beta10 175 7/13/2023
1.1.6-beta1 168 6/29/2023
1.1.5 201 6/28/2023
1.1.5-beta6 163 6/28/2023
1.1.5-beta5 146 6/28/2023
1.1.5-beta4 140 6/25/2023
1.1.5-beta3 163 6/25/2023
1.1.5-beta2 157 6/25/2023
1.1.5-beta1 155 6/25/2023
1.1.4 196 6/21/2023
1.1.3 163 6/21/2023
1.1.2 179 6/20/2023
1.1.1 186 6/20/2023
1.1.0 183 6/20/2023
1.1.0-beta9 149 6/9/2023
1.1.0-beta8 142 6/9/2023
1.1.0-beta7 165 6/9/2023
1.1.0-beta6 174 6/9/2023
1.1.0-beta5 146 6/9/2023
1.1.0-beta4 158 6/9/2023
1.1.0-beta3 148 6/9/2023
1.1.0-beta2 166 6/9/2023
1.1.0-beta17 140 6/14/2023
1.1.0-beta16 146 6/14/2023
1.1.0-beta15 158 6/14/2023
1.1.0-beta14 141 6/13/2023
1.1.0-beta13 166 6/10/2023
1.1.0-beta12 172 6/10/2023
1.1.0-beta11 146 6/10/2023
1.1.0-beta10 170 6/10/2023
1.1.0-beta1 174 6/9/2023
1.0.13 221 6/6/2023 1.0.13 is deprecated because it has critical bugs.
1.0.12 196 6/6/2023
1.0.11 169 6/5/2023
1.0.10 173 5/25/2023
1.0.9 176 5/24/2023
1.0.8 158 5/22/2023
1.0.7 224 5/3/2023
1.0.6 230 3/23/2023
1.0.5 252 3/19/2023
1.0.4 306 3/13/2023
1.0.3 268 3/10/2023
1.0.1 403 2/11/2023
1.0.0 654 9/29/2020