SuncodeSoftware.SuperSDK.Data 4.4.0

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

SuperSDK.Data

数据访问层,基于 Entity Framework Core 和 SQLite 的数据持久化。

安装

dotnet add package SuperSDK.Data

使用示例

1. 定义实体模型

using SuperSDK.Data;
using System.ComponentModel.DataAnnotations;

public class TestConfig : IEntity, IDatabaseEntity, ITableEntity
{
    [Key]
    public string Id { get; set; } = Guid.NewGuid().ToString();
    
    [Required]
    public string ConfigName { get; set; } = "";
    
    public string ConfigValue { get; set; } = "";
    
    // 指定数据库名(与项目名一致)
    public string DatabaseName => "YourProjectName";
    
    // 指定表名(与类名一致)
    public string TableName => "TestConfig";
}

2. 初始化数据库

using SuperSDK.Data;

// 注册实体
DbContextFactory.RegisterEntity<TestConfig>();

// 初始化数据库
DbContextFactory.Initialize();

3. CRUD 操作

using SuperSDK.Data;

// 插入
var config = new TestConfig 
{ 
    ConfigName = "AppTheme", 
    ConfigValue = "Dark" 
};
EntityStore.Insert(config);

// 查询所有
var allConfigs = EntityStore.GetAll<TestConfig>();

// 条件查询
var darkConfigs = EntityStore.Find<TestConfig>(c => c.ConfigValue == "Dark");

// 更新
config.ConfigValue = "Light";
EntityStore.Update(config);

// 删除
EntityStore.Delete(config);

🔐 加密字段

对于需要加密存储的敏感数据:

public class UserProfile : IEntity, IEncryptedEntity, IDatabaseEntity, ITableEntity
{
    [Key]
    public string Id { get; set; } = Guid.NewGuid().ToString();
    
    public string Username { get; set; } = "";
    
    // 加密字段 - 自动存储在 secure.db 中
    [Encrypted]
    public string Password { get; set; } = "";
    
    [Encrypted]
    public List<string> ApiKeys { get; set; } = new();
    
    public string DatabaseName => "YourProjectName";
    public string TableName => "UserProfile";
}

// 初始化加密数据库
EncryptedFieldManager.Initialize(
    "Data/secure.db", 
    "YourSecurePassword123!"
);
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 (3)

Showing the top 3 NuGet packages that depend on SuncodeSoftware.SuperSDK.Data:

Package Downloads
SuncodeSoftware.SuperSDK.UI

Avalonia UI 通用组件库 - 通知管理、对话框、ViewModelBase 等

SuncodeSoftware.SuperSDK.App

Application foundation framework for Avalonia-based Goes applications

SuncodeSoftware.SuperSDK.Talk

SuperSDK AI 对话组件库 - 提供可扩展的聊天消息模型、ViewModel 层、渲染注册表与 Avalonia ChatBox 控件,原生集成 MessageBus

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.0 0 3/13/2026
4.8.0 37 3/12/2026
4.7.0 31 3/12/2026
4.6.0 33 3/12/2026
4.5.0 40 3/12/2026
4.4.0 41 3/12/2026
4.3.0 40 3/12/2026
4.1.0 133 3/9/2026
4.0.3 127 3/6/2026
4.0.2 125 3/6/2026
4.0.1 116 3/6/2026
4.0.0 123 3/6/2026
3.13.0 132 3/6/2026
3.12.4 119 3/6/2026
3.12.0 119 3/6/2026
3.11.0 118 3/6/2026
3.10.10 134 3/5/2026
3.10.8 127 3/5/2026
3.10.7 133 3/5/2026
3.10.6 130 3/5/2026
Loading failed

new talk v3.0.0