SonnetDB.EntityFrameworkCore
2.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SonnetDB.EntityFrameworkCore --version 2.2.0
NuGet\Install-Package SonnetDB.EntityFrameworkCore -Version 2.2.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="SonnetDB.EntityFrameworkCore" Version="2.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SonnetDB.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="SonnetDB.EntityFrameworkCore" />
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 SonnetDB.EntityFrameworkCore --version 2.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SonnetDB.EntityFrameworkCore, 2.2.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 SonnetDB.EntityFrameworkCore@2.2.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=SonnetDB.EntityFrameworkCore&version=2.2.0
#tool nuget:?package=SonnetDB.EntityFrameworkCore&version=2.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SonnetDB.EntityFrameworkCore
SonnetDB.EntityFrameworkCore 是 SonnetDB 的 Entity Framework Core Provider,基于 SonnetDB ADO.NET 包提供关系表 CRUD、基础查询翻译、类型映射和 migrations SQL 支持。
安装
dotnet add package SonnetDB.EntityFrameworkCore --version 0.1.0
最小示例
using Microsoft.EntityFrameworkCore;
using SonnetDB.EntityFrameworkCore.Extensions;
var options = new DbContextOptionsBuilder<DeviceContext>()
.UseSonnetDB("Data Source=./demo-data")
.Options;
using var context = new DeviceContext(options);
await context.Database.MigrateAsync();
context.Devices.Add(new Device { Id = 1, Name = "pump", Enabled = true });
await context.SaveChangesAsync();
var online = await context.Devices
.Where(device => device.Enabled)
.ToListAsync();
当前范围
UseSonnetDB(...)支持连接字符串和已有DbConnection。- 支持关系表基础 CRUD、类型映射、SQL 生成和
ToQueryString()。 - 支持 migrations SQL、默认
__EFMigrationsHistory和自定义 history table。 - 支持
StartsWith、EndsWith、Contains到LIKE的基础字符串模式翻译。
该 Provider 依赖 SonnetDB 当前关系表能力,完整兼容性以仓库测试和发布说明为准。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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.
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.8)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.8)
- SonnetDB (>= 2.2.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SonnetDB.EntityFrameworkCore:
| Package | Downloads |
|---|---|
|
DotNetDiag.HealthChecks.UI.SonnetDB.Storage
HealthChecks.UI.SonnetDB.Storage package contains the required classes to use SonnetDB provider in the UI |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on SonnetDB.EntityFrameworkCore:
| Repository | Stars |
|---|---|
|
IoTSharp/GitCandy
A git server side platform based on .Net 10 一个基于.Net 10 的git服务端。QQ群:200319579。
|