EasilyNET.WebCore
5.25.1112.15
dotnet add package EasilyNET.WebCore --version 5.25.1112.15
NuGet\Install-Package EasilyNET.WebCore -Version 5.25.1112.15
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="EasilyNET.WebCore" Version="5.25.1112.15" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EasilyNET.WebCore" Version="5.25.1112.15" />
<PackageReference Include="EasilyNET.WebCore" />
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 EasilyNET.WebCore --version 5.25.1112.15
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EasilyNET.WebCore, 5.25.1112.15"
#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 EasilyNET.WebCore@5.25.1112.15
#: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=EasilyNET.WebCore&version=5.25.1112.15
#tool nuget:?package=EasilyNET.WebCore&version=5.25.1112.15
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EasilyNET.WebCore
一些.Net 6+ 的 WebApi 一些中间件以及部分数据类型到 Json 的转换
Changelog
- 新增 BusinessExceptionHandler 用于适应.NET8 新增的全局异常处理
- 移除 ResultObject.cs 因为这种统一返回格式属于特殊的要求,正常的 HTTP 请求应该直接返回数据,而请求是否成功以及产生的异常应该由 HTTP 状态码反应.
- 同时将涉及到该类的 Filter 和中间件移动到 Api 例子中.
EasilyNET.WebCore JsonConverter 使用?
该库目前补充的 Converter 有: DateTimeConverter, DateTimeNullConverter, TimeSpanJsonConverter, TimeOnly, DateOnly
其中 TimeOnly 和 DateOnly 仅支持.Net6+ API 内部使用,传入和传出 Json 仅支持固定格式字符串
如:
DateOnly👉"2021-11-11",TimeOnly👉"23:59:25"使用 Nuget 安装 EasilyNET.WebCore
然后在上述 Program.cs 中添加如下内容
.Net 6 +
// Add services to the container.
builder.Services.AddControllers().AddJsonOptions(c =>
{
c.JsonSerializerOptions.Converters.Add(new SystemTextJsonConvert.DateTimeConverter());
c.JsonSerializerOptions.Converters.Add(new SystemTextJsonConvert.DateTimeNullConverter());
});
EasilyNET.WebCore 中间件使用?
目前支持全局 API 执行时间中间件
新增限流中间件(防抖),用于避免短时间内,重复请求
使用 Nuget 安装 # EasilyNET.WebCore
然后在 Program.cs 中添加如下内容
.Net 6 +
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment()) app.UseDeveloperExceptionPage();
app.UseResponseTime(); // 全局Action执行时间
...
app.Run();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 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
- EasilyNET.Core (>= 5.25.1112.15)
-
net8.0
- EasilyNET.Core (>= 5.25.1112.15)
-
net9.0
- EasilyNET.Core (>= 5.25.1112.15)
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 |
|---|---|---|
| 5.25.1112.15 | 46 | 11/11/2025 |
| 4.25.1016.112 | 371 | 10/16/2025 |