Unravel.AspNet.Mvc 0.1.36-alpha

This is a prerelease version of Unravel.AspNet.Mvc.
dotnet add package Unravel.AspNet.Mvc --version 0.1.36-alpha
                    
NuGet\Install-Package Unravel.AspNet.Mvc -Version 0.1.36-alpha
                    
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="Unravel.AspNet.Mvc" Version="0.1.36-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unravel.AspNet.Mvc" Version="0.1.36-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Unravel.AspNet.Mvc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Unravel.AspNet.Mvc --version 0.1.36-alpha
                    
#r "nuget: Unravel.AspNet.Mvc, 0.1.36-alpha"
                    
#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.
#:package Unravel.AspNet.Mvc@0.1.36-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Unravel.AspNet.Mvc&version=0.1.36-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Unravel.AspNet.Mvc&version=0.1.36-alpha&prerelease
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 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 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 1,694 5/26/2024
0.1.30-alpha 687 3/6/2024
0.1.26-alpha 80 3/4/2024
0.1.20-alpha 294 7/10/2023
0.1.13-alpha 136 7/10/2023
0.1.11-alpha 138 7/9/2023