I work on csharp webapi .net core 6
i need to pass number integer id with object
but i don't know how to do on post man put method request
[HttpPut("{id}")]
public async Task<IActionResult> Update(int id, UpdateItemCommand command)
{
if (id != command.Id)
{
return BadRequest();
}
return Ok(await Mediator.Send(command));
}
this is my url
https://localhost:7235/api/items/[
^]
What I have tried:
on post man i add this script on body
{
"itemId": 4,
"itemNameAR": "قلم",
"itemNameEN": "pen2",
"costTypeId": 1,
"minLimitQunatity": 1,
"costAccountID": 1,
"departmentID": 1,
"itemCategoryId": 1,
"description": "1",
"hasExpireDate": true,
"isActive": true,
"createdBy": 1,
"modifiedBy": 1,
"createdDate": "0001-01-01T00:00:00",
"modifiedDate": "0001-01-01T00:00:00",
"itemattribute": null
}