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)
2448
private void AcceptsProduct_Form([
FromForm
] Product product)
2550
private void AcceptsPerson([
FromForm
] Person person)
2786
[
FromForm
]
EndpointMetadataApiDescriptionProviderTest.cs (2)
1320
AssertFormFileParameter(GetApiDescription(([
FromForm
(Name = "file_name")] IFormFile file) => { }), typeof(IFormFile), "file_name");
1327
AssertFormFileCollection(([
FromForm
] IFormFileCollection uploads) => Results.NoContent(), "uploads");
Microsoft.AspNetCore.Mvc.Core.Test (8)
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
88
public IActionResult FromFormParameter([
FromForm
] string parameter) => null;
92
public IActionResult ActionWithConsumesAttribute([
FromForm
] string parameter) => null;
ApplicationModels\InferParameterBindingInfoConventionTest.cs (6)
989
public IActionResult FromFormParameter([
FromForm
] string parameter) => null;
993
public IActionResult ActionWithConsumesAttribute([
FromForm
] string parameter) => null;
1048
public IActionResult FromFormFormFileParameters([
FromForm
] IFormFile p1, [
FromForm
] IFormFile[] p2, [
FromForm
] IFormFileCollection p3) => null;
1164
[
FromForm
]
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
AntiforgeryMiddlewareTest.cs (5)
208
public ActionResult PostWithRequireAntiforgeryToken([
FromForm
] Todo todo)
214
public ActionResult PostWithRequireAntiforgeryTokenAndSizeLimit([
FromForm
] Todo todo)
220
public ActionResult PostWithRequireAntiforgeryTokenAndFormLimit([
FromForm
] Todo todo)
231
public ActionResult PostWithRequireAntiforgeryTokenAndFilterAttribute([
FromForm
] Todo todo)
242
public 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)
24
builder.MapPost("/", ([
FromForm
] IFormFile formFile) => { });
100
builder.MapPost("/", ([
FromForm
] IFormFileCollection formFileCollection) => { });
403
builder.MapPost("/form", ([
FromForm
] Todo todo) => { });
460
builder.MapPost("/form", ([
FromForm
] int id, [
FromForm
] DateTime date, [
FromForm
] short? value) => { });
552
private void ActionWithFormModel([
FromForm
] Todo todo) { }
562
builder.MapPost("/form", ([
FromForm
] Todo todo, [
FromForm
] Error error) => { });
690
private void ActionWithMultipleFormModel([
FromForm
] Todo todo, [
FromForm
] Error error) { }
725
private void ActionWithFormModelSingleProp([
FromForm
] ModelWithSingleProperty model) { }
764
private void ActionWithFormModelNullableProps([
FromForm
] ModelWithNullableProperties model) { }
811
private void ActionWithFormModelWithFile([
FromForm
] ResumeUpload model) { }
820
builder.MapGet("/resume", ([
FromForm
] ResumeUpload model) => { });
884
private void ActionWithIntForm([
FromForm
] int model) { }
887
private void ActionWithGuidForm([
FromForm
] Guid model) { }
890
private 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"]
951
builder.MapGet("/api/", ([
FromForm
] Todo todo, IFormFile formFile, [
FromForm
] Guid guid) => { });
1076
private void ActionWithMixedFormTypes([
FromForm
] Todo todo, IFormFile formFile, [
FromForm
] Guid guid) { }
Services\OpenApiGeneratorTests.cs (2)
833
AssertFormFileParameter(GetOpenApiOperation(([
FromForm
(Name = "file_name")] IFormFile file) => { }), "object", "file_name");
840
AssertFormFileCollection(([
FromForm
] IFormFileCollection uploads) => Results.NoContent(), "uploads");
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (6)
76
builder.MapPost("/", ([
FromForm
] ProjectBoard todo) => { });
130
builder.MapPost("/required-form", ([Required][
FromForm
] Todo todo) => { });
131
builder.MapPost("/non-required-form", ([
FromForm
] Todo todo) => { });
570
builder.MapPost("/api", ([
FromForm
] string? name, [
FromForm
] int? number, [
FromForm
] int[]? ids) => { });
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (3)
183
builder.MapPost("/api", (IFormFile resume, [
FromForm
] Todo todo) => { });
184
builder.MapPost("/api-2", ([
FromForm
] string name, [
FromForm
] Todo todo2) => { });
Transformers\SchemaTransformerTests.cs (2)
674
builder.MapPost("/todo", ([
FromForm
] Todo todo, [
FromForm
] Error error) => { });
MinimalFormSample (1)
Program.cs (1)
52
app.MapPost("/todo", [ValidateAntiForgeryToken] ([
FromForm
] Todo todo) => Results.Ok(todo));
Sample (3)
Controllers\TestController.cs (1)
22
public IActionResult PostForm([
FromForm
] MvcTodo todo)
Program.cs (2)
64
forms.MapPost("/form-todo", ([
FromForm
] Todo todo) => Results.Ok(todo));
65
forms.MapPost("/forms-pocos-and-files", ([
FromForm
] Todo todo, IFormFile file) => Results.Ok(new { Todo = todo, File = file.FileName }));