Boxed.AspNetCore 9.0.1
前缀保留
此代码包具有 SemVer 2.0.0 代码包版本:9.0.1+build.1063。
dotnet add package Boxed.AspNetCore --version 9.0.1
NuGet\Install-Package Boxed.AspNetCore -Version 9.0.1
此命令旨在在 Visual Studio 的包管理器控制台中使用,因为它使用 NuGet 模块的 Install-Package 版本。
<PackageReference Include="Boxed.AspNetCore" Version="9.0.1" />
对于支持 PackageReference 的项目,将此 XML 节复制到项目文件中以引用代码包。
paket add Boxed.AspNetCore --version 9.0.1
NuGet 团队不提供对此客户端的支持。请联系其 维护者 以获取支持。
#r "nuget: Boxed.AspNetCore, 9.0.1"
#r 指令可用于 F# Interactive 和 Polyglot Notebooks。将此内容复制到交互式工具或脚本的源代码中,以引用代码包。
// Install Boxed.AspNetCore as a Cake Addin #addin nuget:?package=Boxed.AspNetCore&version=9.0.1 // Install Boxed.AspNetCore as a Cake Tool #tool nuget:?package=Boxed.AspNetCore&version=9.0.1
NuGet 团队不提供对此客户端的支持。请联系其 维护者 以获取支持。
Boxed.AspNetCore
为 ASP.NET Core 项目提供中间件、MVC 过滤器、扩展方法和辅助代码。
流畅接口扩展
ILoggingBuilder 扩展
loggingBuilder
.AddIfElse(
hostingEnvironment.IsDevelopment(),
x => x.AddConsole(...).AddDebug(),
x => x.AddSerilog(...));
IConfiguration 扩展
this.configuration = new ConfigurationBuilder()
.SetBasePath(hostingEnvironment.ContentRootPath)
.AddJsonFile("config.json")
.AddJsonFile($"config.{hostingEnvironment.EnvironmentName}.json", optional: true)
.AddIf(
hostingEnvironment.IsDevelopment(),
x => x.AddUserSecrets())
.AddEnvironmentVariables()
.AddApplicationInsightsSettings(developerMode: !hostingEnvironment.IsProduction())
.Build();
IApplicationBuilder 扩展
application
.UseIfElse(
environment.IsDevelopment(),
x => x.UseDeveloperExceptionPage(),
x => x.UseStatusCodePagesWithReExecute("/error/{0}/"))
.UseIf(
environment.IsStaging(),
x => x.UseStagingSpecificMiddleware())
.UseStaticFiles()
.UseMvc();
SEO 友好 URL
[HttpGet("product/{id}/{title}", Name = "GetProduct")]
public IActionResult GetProduct(int id, string title)
{
var product = this.productRepository.Find(id);
if (product == null)
{
return this.NotFound();
}
// Get the actual friendly version of the title.
string friendlyTitle = FriendlyUrlHelper.GetFriendlyTitle(product.Title);
// Compare the title with the friendly title.
if (!string.Equals(friendlyTitle, title, StringComparison.Ordinal))
{
// If the title is null, empty or does not match the friendly title, return a 301 Permanent
// Redirect to the correct friendly URL.
return this.RedirectToRoutePermanent("GetProduct", new { id = id, title = friendlyTitle });
}
// The URL the client has browsed to is correct, show them the view containing the product.
return this.View(product);
}
标准 URL
产品 | 版本 兼容和附加的计算机目标框架版本。 |
---|---|
.NET | net6.0 兼容。 net6.0-android 已计算。 net6.0-ios 已计算。 net6.0-maccatalyst 已计算。 net6.0-macos 已计算。 net6.0-tvos 已计算。 net6.0-windows 已计算。 net7.0 兼容。 net7.0-android 已计算。 net7.0-ios 已计算。 net7.0-maccatalyst 已计算。 net7.0-macos 已计算。 net7.0-tvos 已计算。 net7.0-windows 已计算。 net8.0 已计算。 net8.0-android 已计算。 net8.0-browser 已计算。 net8.0-ios 已计算。 net8.0-maccatalyst 已计算。 net8.0-macos 已计算。 net8.0-tvos 已计算。 net8.0-windows 已计算。 |
-
net6.0
- 无依赖项。
-
net7.0
- 无依赖项。
NuGet 包包 (3)
显示依赖于 Boxed.AspNetCore 的前 3 个 NuGet 包
包 | 下载 |
---|---|
Boxed.AspNetCore.Swagger 提供 ASP.NET Core 中间件、MVC 过滤器、扩展方法和辅助代码,以便实现具有 Swagger(OpenAPI)的 ASP.NET Core 项目。 |
|
HMRC.ESFA.Levy.Api.Types
从 HMRC 返回学徒税信息 |
|
WebScheduler.Client.Http Web调度程序的API |
GitHub仓库 (1)
显示基于Boxed.AspNetCore的前1个最受欢迎的GitHub仓库
仓库 | 星星 |
---|---|
Dotnet-Boxed/Templates
提供电池式套餐的.NET项目模板,为您提供启动所需的最少代码,让您更快地开始。
|
版本 | 下载 | 最后更新 |
---|---|---|
9.0.1 | 39,940 | 9/14/2023 |
9.0.0 | 237 | 9/14/2023 |
8.1.2 | 224,640 | 8/24/2022 |
8.1.1 | 418 | 8/24/2022 |
8.1.0 | 320 | 8/24/2022 |
8.0.0 | 184,993 | 11/9/2021 |
7.0.0 | 61,950 | 4/29/2021 |
6.2.0 | 11,036 | 4/1/2021 |
6.1.1 | 3,466 | 3/12/2021 |
6.1.0 | 1,555 | 3/11/2021 |
6.0.0 | 23,014 | 11/23/2020 |
5.1.2 | 180,587 | 6/1/2020 |
5.1.2-preview.0.44 | 422 | 4/3/2020 |
5.1.1 | 101,295 | 12/11/2019 |
5.1.0 | 1,345 | 12/9/2019 |
5.0.0 | 2,231 | 11/30/2019 |
4.0.0 | 24,563 | 9/3/2019 |
4.0.0-beta-0000 | 1,800 | 9/3/2019 |
3.3.0 | 25,453 | 7/14/2019 |
3.2.0 | 36,394 | 2/13/2019 |
3.1.0 | 6,372 | 12/31/2018 |
3.0.0 | 4,321 | 12/27/2018 |
2.2.2 | 7,424 | 10/22/2018 |
2.2.1 | 1,671 | 10/19/2018 |
2.2.0 | 2,070 | 10/17/2018 |
2.1.0 | 38,470 | 7/13/2018 |
2.0.0 | 5,876 | 6/6/2018 |
1.1.0 | 2,749 | 5/25/2018 |
1.0.0 | 4,524 | 5/6/2018 |