Code
·
19 lines
·
452 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19using Microsoft.AspNetCore.Mvc;
namespace VanDerHeijden.JsonBodyProviderTest.Controllers;
[Route("api")]
public class OrdersController : ControllerBase
{
[HttpPost("orders")]
public IActionResult PlaceOrder(
string OrderNumber,
DateOnly OrderDate,
decimal TotalAmount,
List<string> ProductCodes,
Guid CustomerId,
string? Remark = null)
{
return Ok(new { OrderNumber, OrderDate, TotalAmount, ProductCodes, CustomerId, Remark });
}
}