A somewhat late answer, in addition to @Ruikai Feng's answer, if your UI (Swagger, Scalar, or other) doesn't display the correct Content-Type, you can specify it like this in your controller at your endpoint:
[Consumes("multipart/form-data")] // 👈 Add it like this
[HttpPost("register"), DisableRequestSizeLimit]
public IActionResult RegisterUser([FromForm] RegisterModel registermodel)
{
return StatusCode(200);
}