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.
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.
// Install Unravel.AspNet.Mvc as a Cake Addin
#addin nuget:?package=Unravel.AspNet.Mvc&version=0.1.36-alpha&prerelease

// Install Unravel.AspNet.Mvc as a Cake Tool
#tool nuget:?package=Unravel.AspNet.Mvc&version=0.1.36-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 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 596 5/26/2024
0.1.30-alpha 383 3/6/2024
0.1.26-alpha 57 3/4/2024
0.1.20-alpha 245 7/10/2023
0.1.13-alpha 85 7/10/2023
0.1.11-alpha 86 7/9/2023