AzureFunctions.MvcModelBinding
4.0.2
See the version list below for details.
dotnet add package AzureFunctions.MvcModelBinding --version 4.0.2
NuGet\Install-Package AzureFunctions.MvcModelBinding -Version 4.0.2
<PackageReference Include="AzureFunctions.MvcModelBinding" Version="4.0.2" />
<PackageVersion Include="AzureFunctions.MvcModelBinding" Version="4.0.2" />
<PackageReference Include="AzureFunctions.MvcModelBinding" />
paket add AzureFunctions.MvcModelBinding --version 4.0.2
#r "nuget: AzureFunctions.MvcModelBinding, 4.0.2"
#:package AzureFunctions.MvcModelBinding@4.0.2
#addin nuget:?package=AzureFunctions.MvcModelBinding&version=4.0.2
#tool nuget:?package=AzureFunctions.MvcModelBinding&version=4.0.2
AzureFunctions.MvcModelBinding
Provides ASP.NET Core MVC model binding for Azure Functions
https://www.nuget.org/packages/AzureFunctions.MvcModelBinding
Problem
Azure Function is lacking of built-in ASP.NET Core MVC Model Binding attributes like [FromQuery], [FromBody], [FromForm].
Solution
- Expose custom Model binding attributes derived from ASP.NET Core MVC attributes
- Provide custom extension that derives from
IExtensionConfigProvider - Finish configuration of ASP.NET Core MVC services
- Pass data from Azure Function binding attributes to ASP.NET Core MVC model binderand validator
Example
Add MVC Core services by calling
builder.Services.AddMvcCore()Register Azure Function Model binding by calling
.AddFunctionModelBinding()Add [FromQuery]/[FromBody]/[FromForm] attributes to your function parameters
[FunctionName("QueryData")] public object QueryData( [HttpTrigger(AuthorizationLevel.Anonymous, "POST", Route = "data")] HttpRequest request, [FromQuery, Required] string filter, [FromBody] object content) { // your code goes here }Enjoy 😄
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.Azure.WebJobs (>= 3.0.32)
-
net6.0
- Microsoft.Azure.WebJobs (>= 3.0.32)
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 |
|---|---|---|
| 6.0.0 | 8,437 | 6/4/2024 |
| 4.2.1 | 4,627 | 9/2/2023 |
| 4.2.0 | 226 | 9/1/2023 |
| 4.1.0 | 957 | 5/25/2023 |
| 4.0.8.3 | 254 | 5/25/2023 |
| 4.0.8.2 | 243 | 5/25/2023 |
| 4.0.8.1 | 249 | 5/25/2023 |
| 4.0.8 | 1,386 | 10/4/2022 |
| 4.0.7 | 497 | 10/4/2022 |
| 4.0.6 | 481 | 10/4/2022 |
| 4.0.5 | 680 | 8/10/2022 |
| 4.0.4 | 593 | 6/24/2022 |
| 4.0.3 | 4,078 | 5/10/2022 |
| 4.0.2 | 578 | 4/23/2022 |
| 4.0.1 | 561 | 4/22/2022 |
| 4.0.0 | 669 | 4/22/2022 |
| 1.0.6 | 757 | 4/6/2022 |
| 1.0.5 | 689 | 10/25/2021 |
| 1.0.4 | 491 | 10/25/2021 |
| 1.0.3 | 460 | 9/28/2021 |
| 1.0.2 | 469 | 8/26/2021 |
| 1.0.1 | 452 | 8/26/2021 |
| 1.0.0 | 451 | 8/25/2021 |
- Added support of .NET 6.0