![]() |
VOOZH | about |
dotnet add package ColorVision.Database --version 1.5.5.3
NuGet\Install-Package ColorVision.Database -Version 1.5.5.3
<PackageReference Include="ColorVision.Database" Version="1.5.5.3" />
<PackageVersion Include="ColorVision.Database" Version="1.5.5.3" />Directory.Packages.props
<PackageReference Include="ColorVision.Database" />Project file
paket add ColorVision.Database --version 1.5.5.3
#r "nuget: ColorVision.Database, 1.5.5.3"
#:package ColorVision.Database@1.5.5.3
#addin nuget:?package=ColorVision.Database&version=1.5.5.3Install as a Cake Addin
#tool nuget:?package=ColorVision.Database&version=1.5.5.3Install as a Cake Tool
版本: 1.5.5.1 | 目标框架: .NET 8.0 / .NET 10.0 Windows | UI框架: WPF
数据库访问层,提供统一的数据库操作接口和可视化管理工具。支持 MySQL 和 SQLite 混用,提供数据库优先的表浏览器、查询工具、连接管理等功能。
MySQL 和 SQLite 日志,其他 SQLite 文件可通过 provider 注册DataGrid 直接绑定 DataTable,支持分页、搜索、排序、编辑、保存、删除IDatabaseBrowserProvider 执行 Insert / Update / Delete,修改和删除要求表有主键MySqlConnect) — 可视化连接参数设置MysqlWizardStep) — 向导式配置流程BaseTableDao<T>) — 基于 SqlSugar 的扩展方法(CRUD、分页、批量)IEntity) — 标准化实体定义(int Id 属性)EntityBase / ViewEntity) — 带 [SugarColumn] 主键映射的基类IDatabaseBrowserProvider) — 注册可浏览的数据源ColorVision.Database/
├── IEntity.cs # 实体接口 (int Id)
├── EntityBase.cs # 实体基类 (POCO)
├── ViewEntity.cs # 可绑定实体基类 (INotifyPropertyChanged)
├── BaseTableDao.cs # 泛型 DAO + 扩展方法 (CRUD/分页/批量)
├── DatabaseType.cs # 数据库类型枚举
├── IDatabaseBrowserProvider.cs # 数据库浏览器 Provider 接口
├── DatabaseBrowserModels.cs # 库/表/列/分页模型
├── DatabaseBrowserWindow.xaml # 数据库浏览器主窗口
├── DatabaseRowEditWindow.xaml # 通用新增行弹窗
│
├── GenericQueryWindow.xaml # 高级查询窗口
│
├── MySqlControl.cs # MySQL 连接管理 (单例)
├── MySQLConfig.cs # MySQL 配置 (IConfig)
├── MySqlConnect.xaml # 连接配置窗口
├── MySqlSetting.cs # 设置管理
├── MysqlWizardStep.cs # 配置向导步骤
├── IMysqlCommand.cs # SQL 命令接口
├── ExportMySqlInitTables.cs # 初始化表导出
│
└── SqliteLog/ # SQLite 日志子系统
├── LogEntry.cs # 日志实体
├── SqliteLogManager.cs # SQLite 连接管理 + 日志写入
├── SqliteLogInitializer.cs # 初始化器
└── SqliteLogWindow.xaml # 日志查看窗口
DatabaseBrowserProviderRegistry.Register(new SqliteDatabaseBrowserProvider(
"sqlite.demo",
"SQLite Demo",
() => DemoDbManager.DbPath,
DemoDbManager.CreateDbClient));
// 通过菜单打开(工具 → 数据库浏览器)
// 或手动打开
new DatabaseBrowserWindow().Show();
var dao = new BaseTableDao<UserEntity>();
// 查询
var all = dao.GetAll();
var user = dao.GetById(1);
var filtered = dao.GetAllByParam(new Dictionary<string, object> { { "Username", "admin" } });
// 分页
var (items, total) = dao.GetPaged(pageIndex: 1, pageSize: 20);
// 保存(Id <= 0 插入,否则更新)
dao.Save(user);
// 删除
dao.DeleteById(1);
var db = new SqlSugarClient(/* ... */);
var results = new List<UserEntity>();
var query = new GenericQuery<UserEntity>(db, results);
var window = new GenericQueryWindow(query);
window.Show();
dotnet build UI/ColorVision.Database/ColorVision.Database.csproj -f net8.0-windows -p:Platform=x64
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 net8.0-windows7.0 is compatible. net9.0-windows net9.0-windows was computed. net10.0-windows net10.0-windows was computed. net10.0-windows7.0 net10.0-windows7.0 is compatible. |
Showing the top 3 NuGet packages that depend on ColorVision.Database:
| Package | Downloads |
|---|---|
|
ColorVision.Solution
Package Description |
|
|
ColorVision.SocketProtocol
Package Description |
|
|
ColorVision.UI.Desktop
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.5.3 | 127 | 5/31/2026 |
| 1.5.5.2 | 122 | 4/24/2026 |
| 1.5.5.1 | 115 | 4/13/2026 |
| 1.5.4.1 | 119 | 3/31/2026 |
| 1.5.1.1 | 127 | 2/16/2026 |
| 1.4.1.1 | 122 | 2/3/2026 |
| 1.3.10.1 | 135 | 1/14/2026 |
| 1.3.9.2 | 246 | 11/24/2025 |
| 1.3.9.1 | 328 | 11/16/2025 |
| 1.3.8.5 | 206 | 10/17/2025 |
| 1.3.8.4 | 230 | 9/30/2025 |
| 1.3.8.3 | 215 | 9/29/2025 |
| 1.3.8.2 | 178 | 9/28/2025 |
| 1.3.8.1 | 225 | 9/25/2025 |
| 1.3.6.2 | 227 | 9/8/2025 |
| 1.3.6.1 | 207 | 9/5/2025 |
| 1.3.5.6 | 242 | 9/3/2025 |
| 1.3.5.5 | 268 | 8/29/2025 |
| 1.3.5.4 | 256 | 8/25/2025 |
| 1.3.5.1 | 294 | 8/24/2025 |