1 package tagged with “Smart.SWeb”
Smart.SWeb 使用方法: (在Global.asax.cs文件Application_Start方法添加如下代码) //全局封装webapi的返回结果如:{"Code":500,"Data":null,"Message":"尝试除以零。","Success":false} GlobalConfiguration.Configure(Smart.SWeb.SmartWeb.InitAPIResultAttribute); //全局异常处理 GlobalConfiguration.Configure(Smart.SWeb.SmartWeb.InitApiExceptionHandlingAttribute); (在WebApiConfig.cs文件Register方法添加如下代码) //控制器版本管理 Dictionary<string, object> dic = new Dictionary<string, object>(); dic.Add("config", config); var versionControllerSelector = Smart.Kernel.Resolve<Smart.SWeb.ISVersionControllerSelector>(dic); config.Services.Replace(typeof(IHttpControllerSelector), versionControllerSelector);