Closed
Description
Hello, guys.
I'm going through a problem when using Guid as Id, when I have Entity like:
`
public class SubcategoryDto
{
public Guid Id { get; set; }
public string Description { get; set; }
public Guid CategoryId { get; set; }
}`
and I have a Action in my controller with:
public IActionResult Create(Guid id) { var dto = new SubcategoryDto() { CategoryId = id }; return View(dto); }
I expect in my View I receive the follow object:
{
"id": "00000000-0000-0000-0000-000000000000",
"description": "",
"categoryid": "dba6b8e4-fb16-4f88-290d-08d44abea368"
}
But I receive:
{
"id": "dba6b8e4-fb16-4f88-290d-08d44abea368",
"description": "",
"categoryid": "dba6b8e4-fb16-4f88-290d-08d44abea368"
}
So, is it a issue or I need to do some configuration?
Metadata
Metadata
Assignees
Labels
No labels