Unravel.AspNet.Mvc
0.1.13-alpha
See the version list below for details.
dotnet add package Unravel.AspNet.Mvc --version 0.1.13-alpha
NuGet\Install-Package Unravel.AspNet.Mvc -Version 0.1.13-alpha
<PackageReference Include="Unravel.AspNet.Mvc" Version="0.1.13-alpha" />
paket add Unravel.AspNet.Mvc --version 0.1.13-alpha
#r "nuget: Unravel.AspNet.Mvc, 0.1.13-alpha"
// Install Unravel.AspNet.Mvc as a Cake Addin #addin nuget:?package=Unravel.AspNet.Mvc&version=0.1.13-alpha&prerelease // Install Unravel.AspNet.Mvc as a Cake Tool #tool nuget:?package=Unravel.AspNet.Mvc&version=0.1.13-alpha&prerelease
Unravel.AspNet.Mvc
Similar to ASP.NET Core 2.1's AddMvc()
, Unravel provides an AddAspNetMvc()
extension method on IServiceCollection
that registers a System.Web.Mvc.IDependencyResolver
.
The resulting IAspNetMvcBuilder
is similar to IMvcBuilder
, providing an extension point for additional configuration:
public override void ConfigureServices(IServiceCollection services)
{
services.AddAspNetMvc()
.AddControllersAsServices();
}
MvcOptions
Also similar to ASP.NET Core 2.1, AddAspNetMvc()
accepts an optional Action<MvcOptions>
to consolidate configuration, including:
.AddAspNetMvc(options =>
{
// Equivalent to AreaRegistration.RegisterAllAreas()
options.RegisterAllAreas();
// Equivalent to MvcHandler.DisableMvcResponseHeader
options.DisableMvcResponseHeader = true;
// Equivalent to GlobalFilters.Filters.Add(...)
options.Filters.Add(...);
// Equivalent to ModelBinders.Binders.Add(...)
options.ModelBinders.Add(...);
// Equivalent to RouteTable.Routes.MapRoute(...);
options.Routes.MapRoute(...);
})
IFormFile
Model Binder
AddAspNetMvc()
registers a model binder for IFormFile
, to replace references to
System.Web.HttpPostedFileBase
.
Some IFormFile
properties are not supported, due to HttpPostedFileBase
limitations.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.AspNet.Mvc (>= 5.2.9)
- Unravel.Startup (>= 0.1.13-alpha)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Unravel.AspNet.Mvc:
Package | Downloads |
---|---|
Unravel.AspNetCore.Mvc.ViewFeatures
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.36-alpha | 677 | 5/26/2024 |
0.1.30-alpha | 431 | 3/6/2024 |
0.1.26-alpha | 60 | 3/4/2024 |
0.1.20-alpha | 248 | 7/10/2023 |
0.1.13-alpha | 88 | 7/10/2023 |
0.1.11-alpha | 89 | 7/9/2023 |