84 instantiations of FromForm
ApiExplorerWebSite (3)
Models\OrderDetailsDTO.cs (2)
10[FromForm] 13[FromForm]
Models\OrderDTO.cs (1)
17[FromForm]
Aspire.Dashboard.Tests (1)
Integration\MockOpenIdAuthority.cs (1)
79([FromForm] string code) =>
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (5)
DefaultApiDescriptionProviderTest.cs (3)
2448private void AcceptsProduct_Form([FromForm] Product product) 2550private void AcceptsPerson([FromForm] Person person) 2786[FromForm]
EndpointMetadataApiDescriptionProviderTest.cs (2)
1320AssertFormFileParameter(GetApiDescription(([FromForm(Name = "file_name")] IFormFile file) => { }), typeof(IFormFile), "file_name"); 1327AssertFormFileCollection(([FromForm] IFormFileCollection uploads) => Results.NoContent(), "uploads");
Microsoft.AspNetCore.Mvc.Core.Test (8)
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
88public IActionResult FromFormParameter([FromForm] string parameter) => null; 92public IActionResult ActionWithConsumesAttribute([FromForm] string parameter) => null;
ApplicationModels\InferParameterBindingInfoConventionTest.cs (6)
989public IActionResult FromFormParameter([FromForm] string parameter) => null; 993public IActionResult ActionWithConsumesAttribute([FromForm] string parameter) => null; 1048public IActionResult FromFormFormFileParameters([FromForm] IFormFile p1, [FromForm] IFormFile[] p2, [FromForm] IFormFileCollection p3) => null; 1164[FromForm]
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
AntiforgeryMiddlewareTest.cs (5)
208public ActionResult PostWithRequireAntiforgeryToken([FromForm] Todo todo) 214public ActionResult PostWithRequireAntiforgeryTokenAndSizeLimit([FromForm] Todo todo) 220public ActionResult PostWithRequireAntiforgeryTokenAndFormLimit([FromForm] Todo todo) 231public ActionResult PostWithRequireAntiforgeryTokenAndFilterAttribute([FromForm] Todo todo) 242public ActionResult PostWithRequireAntiforgeryTokenAndDisableSizeLimit([FromForm] Todo todo)
Microsoft.AspNetCore.Mvc.IntegrationTests (5)
ModelPrefixSelectionIntegrationTest.cs (5)
17[FromForm] 62[FromForm] 111[FromForm] 150[FromForm] 199[FromForm]
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageBinderFactoryTest.cs (2)
907[FromForm] 924[FromForm]
Microsoft.AspNetCore.OpenApi.Tests (51)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.RequestBody.cs (38)
24builder.MapPost("/", ([FromForm] IFormFile formFile) => { }); 100builder.MapPost("/", ([FromForm] IFormFileCollection formFileCollection) => { }); 403builder.MapPost("/form", ([FromForm] Todo todo) => { }); 460builder.MapPost("/form", ([FromForm] int id, [FromForm] DateTime date, [FromForm] short? value) => { }); 552private void ActionWithFormModel([FromForm] Todo todo) { } 562builder.MapPost("/form", ([FromForm] Todo todo, [FromForm] Error error) => { }); 690private void ActionWithMultipleFormModel([FromForm] Todo todo, [FromForm] Error error) { } 725private void ActionWithFormModelSingleProp([FromForm] ModelWithSingleProperty model) { } 764private void ActionWithFormModelNullableProps([FromForm] ModelWithNullableProperties model) { } 811private void ActionWithFormModelWithFile([FromForm] ResumeUpload model) { } 820builder.MapGet("/resume", ([FromForm] ResumeUpload model) => { }); 884private void ActionWithIntForm([FromForm] int model) { } 887private void ActionWithGuidForm([FromForm] Guid model) { } 890private void ActionWithDateTimeForm([FromForm] DateTime model) { } 894[([FromForm] int id) => {}, "integer", "int32"], 895[([FromForm] long id) => {}, "integer", "int64"], 896[([FromForm] float id) => {}, "number", "float"], 897[([FromForm] double id) => {}, "number", "double"], 898[([FromForm] decimal id) => {}, "number", "double"], 899[([FromForm] bool id) => {}, "boolean", null], 900[([FromForm] string id) => {}, "string", null], 901[([FromForm] char id) => {}, "string", "char"], 902[([FromForm] byte id) => {}, "integer", "uint8"], 903[([FromForm] short id) => {}, "integer", "int16"], 904[([FromForm] ushort id) => {}, "integer", "uint16"], 905[([FromForm] uint id) => {}, "integer", "uint32"], 906[([FromForm] ulong id) => {}, "integer", "uint64"], 907[([FromForm] Uri id) => {}, "string", "uri"], 908[([FromForm] TimeOnly id) => {}, "string", "time"], 909[([FromForm] DateOnly id) => {}, "string", "date"] 951builder.MapGet("/api/", ([FromForm] Todo todo, IFormFile formFile, [FromForm] Guid guid) => { }); 1076private void ActionWithMixedFormTypes([FromForm] Todo todo, IFormFile formFile, [FromForm] Guid guid) { }
Services\OpenApiGeneratorTests.cs (2)
833AssertFormFileParameter(GetOpenApiOperation(([FromForm(Name = "file_name")] IFormFile file) => { }), "object", "file_name"); 840AssertFormFileCollection(([FromForm] IFormFileCollection uploads) => Results.NoContent(), "uploads");
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (6)
76builder.MapPost("/", ([FromForm] ProjectBoard todo) => { }); 130builder.MapPost("/required-form", ([Required][FromForm] Todo todo) => { }); 131builder.MapPost("/non-required-form", ([FromForm] Todo todo) => { }); 570builder.MapPost("/api", ([FromForm] string? name, [FromForm] int? number, [FromForm] int[]? ids) => { });
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (3)
183builder.MapPost("/api", (IFormFile resume, [FromForm] Todo todo) => { }); 184builder.MapPost("/api-2", ([FromForm] string name, [FromForm] Todo todo2) => { });
Transformers\SchemaTransformerTests.cs (2)
674builder.MapPost("/todo", ([FromForm] Todo todo, [FromForm] Error error) => { });
MinimalFormSample (1)
Program.cs (1)
52app.MapPost("/todo", [ValidateAntiForgeryToken] ([FromForm] Todo todo) => Results.Ok(todo));
Sample (3)
Controllers\TestController.cs (1)
22public IActionResult PostForm([FromForm] MvcTodo todo)
Program.cs (2)
64forms.MapPost("/form-todo", ([FromForm] Todo todo) => Results.Ok(todo)); 65forms.MapPost("/forms-pocos-and-files", ([FromForm] Todo todo, IFormFile file) => Results.Ok(new { Todo = todo, File = file.FileName }));