ASP.NET CORE MVC JSONRESULT пример
public IActionResult ErrorJSON()
{
//return json with 400 error code with message
return new JsonResult(new { message = "Error Messages" })
{
StatusCode = StatusCodes.Status400BadRequest // Status code here
};
}
Mohamed Sami khiari