Hi.Ltd.Mysql 2026.6.10.1503

dotnet add package Hi.Ltd.Mysql --version 2026.6.10.1503
                    
NuGet\Install-Package Hi.Ltd.Mysql -Version 2026.6.10.1503
                    
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="Hi.Ltd.Mysql" Version="2026.6.10.1503" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hi.Ltd.Mysql" Version="2026.6.10.1503" />
                    
Directory.Packages.props
<PackageReference Include="Hi.Ltd.Mysql" />
                    
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 Hi.Ltd.Mysql --version 2026.6.10.1503
                    
#r "nuget: Hi.Ltd.Mysql, 2026.6.10.1503"
                    
#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 Hi.Ltd.Mysql@2026.6.10.1503
                    
#: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=Hi.Ltd.Mysql&version=2026.6.10.1503
                    
Install as a Cake Addin
#tool nuget:?package=Hi.Ltd.Mysql&version=2026.6.10.1503
                    
Install as a Cake Tool

Hi.Ltd.Mysql(主发布线 src/

面向 MySQL 的 HaiLan 数据访问库,提供连接、CRUD、表结构演进、外键、视图、全文索引、索引维护与轻量统计能力。

快速开始

Factory.ConfigureMySql(c =>
{
    c.DataSource = "localhost";
    c.UserId = "root";
    c.Password = "secret";
    c.InitialCatalog = "mydb";
    c.Port = 3306;
});

Factory.LoadModelAssembly(typeof(SysUser).Assembly);
Factory.Synchronize(SchemaSyncOptions.Recommended());

var user = new SysUser { UserCode = "admin", DisplayName = "管理员" };
Factory.Insert(user);

MySQL 能力边界

能力 MySQL 实现
批量 DML 事务内参数化 INSERT/UPDATE,可配置 MySqlBulkInsertSettings.BatchSize
Schema 名称 使用 databaseTableAttribute.Schema 表示库名,空或 dbo 视为当前库
备份/附加库 未实现
ITools 统计 UI 未包含(保留 StatisticTimeGrain 等 DTO 预留)
索引维护 OPTIMIZE TABLE / ANALYZE TABLE

目录结构

源码按能力划分:Attributes/Command/Execute/Interface/Schema/Tables/Factory.csConcurrency/Diagnostics/ 等。

构建

dotnet build src/Hi.Ltd.Mysql.csproj
dotnet test test/Hi.Ltd.Mysql.Test/Hi.Ltd.Mysql.Test.csproj
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 is compatible.  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 Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 is compatible. 
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
2026.6.10.1503 95 6/10/2026

MySQL 连接、CRUD、表结构演进、外键、视图、全文索引、索引维护与轻量统计能力。