Smart.SWeb NuGet Package

Smart.Web
使用方法:

(在Global.asax.cs文件Application_Start方法添加如下代码)
//全局封装webapi的返回结果如:{"Code":500,"Data":null,"Message":"尝试除以零。","Success":false}
GlobalConfiguration.Configure(Smart.Web.SmartWeb.InitAPIResultAttribute);
//全局异常处理
GlobalConfiguration.Configure(Smart.Web.SmartWeb.InitApiExceptionHandlingAttribute);

(在WebApiConfig.cs文件Register方法添加如下代码)
//控制器版本管理
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("config", config);
var versionControllerSelector = Smart.Kernel.Resolve<Smart.Web.ISVersionControllerSelector>(dic);
config.Services.Replace(typeof(IHttpControllerSelector), versionControllerSelector);.




Got any Smart.SWeb Question?





Info

Version: 1.0.0.143
Author(s): Sun
Last Update: Wednesday, July 6, 2022
.NET Fiddle: Create the first Fiddle
NuGet Url: https://www.nuget.org/packages/Smart.SWeb


Install
Install-Package Smart.SWeb
dotnet add package Smart.SWeb
paket add Smart.SWeb
Smart.SWeb Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

1.5

avg-downloads-per-day

5

days-since-last-release

853