Browse Source

Update POST.md

pull/18035/head
Hamza Albreem 3 years ago
committed by GitHub
parent
commit
7027470ab6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/en/Community-Articles/2023-10-31-NET-8-ASP-NET-Core-Minimal-APIs/POST.md

4
docs/en/Community-Articles/2023-10-31-NET-8-ASP-NET-Core-Minimal-APIs/POST.md

@ -32,7 +32,7 @@ app.MapPost("/books", async ([FromForm] string name,
});
```
Another way is to use the [AsParameters] attribute, the following code binds from form values to properties of the `NewBookRequest` record struct:
Another way is using the [AsParameters] attribute, the following code binds from form values to properties of the `NewBookRequest` record struct:
```csharp
public record NewBookRequest([FromForm] string Name, [FromForm] BookType BookType, IFormFile? Cover);
@ -153,4 +153,4 @@ app.Run();
* https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-8.0?view=aspnetcore-8.0#minimal-apis
* https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/parameter-binding?view=aspnetcore-8.0#explicit-binding-from-form-values
* https://learn.microsoft.com/en-us/aspnet/core/fundamentals/native-aot?view=aspnetcore-8.0
* https://learn.microsoft.com/en-us/aspnet/core/fundamentals/native-aot?view=aspnetcore-8.0

Loading…
Cancel
Save