Mvc.ModelBinding.MultiParameter 10.0.1

Suggested Alternatives

VanDerHeijden.JsonBodyProvider

Additional Details

VanDerHeijden.JsonBodyProvider is 100% compatible with MVC stack.

dotnet add package Mvc.ModelBinding.MultiParameter --version 10.0.1
                    
NuGet\Install-Package Mvc.ModelBinding.MultiParameter -Version 10.0.1
                    
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="Mvc.ModelBinding.MultiParameter" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mvc.ModelBinding.MultiParameter" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Mvc.ModelBinding.MultiParameter" />
                    
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 Mvc.ModelBinding.MultiParameter --version 10.0.1
                    
#r "nuget: Mvc.ModelBinding.MultiParameter, 10.0.1"
                    
#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 Mvc.ModelBinding.MultiParameter@10.0.1
                    
#: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=Mvc.ModelBinding.MultiParameter&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Mvc.ModelBinding.MultiParameter&version=10.0.1
                    
Install as a Cake Tool

Mvc.ModelBinding.MultiParameter

Nuget package https://www.nuget.org/packages/Mvc.ModelBinding.MultiParameter/

Calling controller methods using multiple unique parameters.

[HttpPost("~/api/SomeMethod/{SomeParameter2}")]
public IActionResult SomeMethod(
	string Referer,			    // "https://localhost:44346/"
	string SomeParameter2,		// "two"
	string SomeParameter3,		// "three"
	ApiModel SomeParameter4,	//  {four}
	double SomeParameter5,		//  5.5 (multi binding FromBody)
	int SomeParameter6)		    //  6 (multi binding FromQuery)
{
	return Ok();
}

Using attributes to emphasize the source:

[HttpPost]
[Route("~/api/OtherMethod/{SomeParameter2}")]
public IActionResult OtherMethod(
	[FromCooky(Name = ".AspNetCore.Session")] string SomeParameter0, // #######
	[FromHeader(Name = "Referer")] string SomeParameter1,	// "https://localhost:44346/"
	[FromRoute] string SomeParameter2,	// "two"
	[FromQuery] string SomeParameter3,	// "three"
	[FromBody] ApiModel SomeParameter4,	//  {four}
	[FromBody] double SomeParameter5,	//  5.5 (multi binding FromBody)
	[FromQuery] int SomeParameter6)		//  6 (multi binding FromQuery)
{
	return Ok();
}

This test uses netproxy javascript caller for posting Json to controllers.

r = await netproxyasync("./api/SomeMethod/two?SomeParameter3=three&SomeParameter6=6",
{
  "SomeParameter4": // Now the beast has a name
  {
    Name: "four",
    "Users":
    [
      [{ Name: "User00", Alias: ['aliasa', 'aliasb', 'aliasc'] }, { Name: "User01" }],
      [{ Name: "User10" }, { Name: "User11" }],
      [{ Name: "User20" }, { Name: "User21" }]
    ]
  },
  "SomeParameter5": 5.5 // double binder
});

For the multi parameter binding use the WithMultiParameterModelBinding. Example Program.cs:

var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
    ContentRootPath = AppDomain.CurrentDomain.BaseDirectory
});

builder.Services.AddMvcCore().WithMultiParameterModelBinding();

var app = builder.Build();
app.UseRouting();
app.MapControllers();
app.UseDefaultFiles();
app.UseStaticFiles();
app.Run();
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 793 11/18/2025 10.0.1 is deprecated because it is no longer maintained.
8.2.3 609 2/25/2025
8.2.2 3,562 11/26/2024
8.2.1 297 11/25/2024
1.2.1 212 11/24/2024
Loading failed