coolwx.UniformReturnValue 1.0.2

dotnet add package coolwx.UniformReturnValue --version 1.0.2
NuGet\Install-Package coolwx.UniformReturnValue -Version 1.0.2
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="coolwx.UniformReturnValue" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add coolwx.UniformReturnValue --version 1.0.2
#r "nuget: coolwx.UniformReturnValue, 1.0.2"
#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.
// Install coolwx.UniformReturnValue as a Cake Addin
#addin nuget:?package=coolwx.UniformReturnValue&version=1.0.2

// Install coolwx.UniformReturnValue as a Cake Tool
#tool nuget:?package=coolwx.UniformReturnValue&version=1.0.2

统一返回值,包括字典类型(DicResult)和Object(ObjResult)类型两种
以ObjResult调用为例:
1 引入命名空间
using coolwx.UniformReturnValue.ReturnValue;
2 返回值调用
[HttpGet]
public async Task<ActionResult<ObjResult>> InsertOneData()
{
   MyDemoClass data =new() { Id = ObjectId.GenerateNewId().ToString(), Age =  80, Name = $"wx" };
           
   var result = await _repository.InsertAsync(data);
   return ObjResult.OK(result);
}
3 返回结果如下所示:
{
 "success": true,
 "code": 20000,
 "message": "操作成功",
 "total": 0,
 "data": true
}

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on coolwx.UniformReturnValue:

Package Downloads
coolwx.MongoDbRepository

提供了基于MongoDb C# Api的深度封装,能直接通过Linq表达式完成绝大部分的数据库操作 功能特色: 1.支持IOC依赖注入 builder.Host.RegisterMongoAutofac(); var mongoDbConfig = builder.Configuration.GetSection("MongoDbSettings").Get<MongoDbConfig>(); services.AddMogonDbRepository(mongoDbConfig); 2.支持Autofac自动注入仓储泛型接口MongoRepository<> public TestController(MongoRepository<MyDemoClass> repository) { _repository = repository; } 3.支持文件的上传下载及文件信息的查询 4.支持用Linq表达式对索引进行增删 5.支持Collection创建时设置Validator 。。。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 608 1/13/2023
1.0.1 596 11/25/2022

增加新方法