MyDeltas 0.3.1.6-alpha
.NET 7.0
This package targets .NET 7.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
This is a prerelease version of MyDeltas.
dotnet add package MyDeltas --version 0.3.1.6-alpha
NuGet\Install-Package MyDeltas -Version 0.3.1.6-alpha
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="MyDeltas" Version="0.3.1.6-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MyDeltas" Version="0.3.1.6-alpha" />
<PackageReference Include="MyDeltas" />
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 MyDeltas --version 0.3.1.6-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MyDeltas, 0.3.1.6-alpha"
#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 MyDeltas@0.3.1.6-alpha
#: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=MyDeltas&version=0.3.1.6-alpha&prerelease
#tool nuget:?package=MyDeltas&version=0.3.1.6-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MyDeltas
- 数据变化,类似OData中的Delta
1. 配置MyDeltaFactory
IMyDeltaFactory factory = new MyDeltaFactory();
2. 数据变化
MyDelta<TodoItem> delta = factory.Create<TodoItem>();
delta.TrySetValue("Name", "Test");
3. 变化应用到实体
TodoItem todo = new();
bool changed = delta.Patch(todo);
4. 支持System.Text.Json序列化
4.1 直接序列化
MyDelta<TodoItem> delta = factory.Create<TodoItem>();
delta.TrySetValue("Name", "Test");
string json = JsonSerializer.Serialize(delta);
//{"Name":"Test"}
4.2 作为Mvc参数接收部分字段修改
支持Patch请求
[HttpPatch("{id}")]
[ProducesResponseType<TodoItem>(200)]
[ProducesResponseType<string>(304)]
[ProducesResponseType<string>(404)]
public ActionResult Patch([FromRoute] long id, [FromBody] MyDelta<TodoItem> delta)
{
var existingTodo = _todoItems.FirstOrDefault(t => t.Id == id);
if (existingTodo == null)
return NotFound($"Todo with Id {id} not found.");
// 应用变化
if (delta.Patch(existingTodo))
return Ok(existingTodo);
return StatusCode(304, "Todo with Id {id} not modified.");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 is compatible. 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 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- System.Text.Json (>= 9.0.6)
-
.NETStandard 2.1
- System.Text.Json (>= 9.0.6)
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on MyDeltas:
Package | Downloads |
---|---|
MyDeltas.Emit
数据变化处理 |
|
MyDeltas.OpenApi
MyDelta的ApiSchema转化器 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.3.1.6-alpha | 189 | 8/26/2025 |
0.3.1.3-alpha | 202 | 8/5/2025 |
0.3.1.2-alpha | 100 | 7/29/2025 |
0.3.1.1-alpha | 95 | 7/29/2025 |
0.3.1-alpha | 121 | 7/27/2025 |
0.3.0-alpha | 112 | 7/11/2025 |
0.2.0-alpha | 127 | 7/9/2025 |
0.1.0-alpha | 123 | 6/29/2025 |