Post request isn't receiving id from object
I'm not sure if this is a front end issue or backend issue but unless I pass the id from the query string, I'm not receiving it through the object. So when I set a break point, employeeDto.DepartmentId is 0. Everything else is there. But if I do [FromQuery] int id and pass the id through the query string from the front end, I'll receive it. I'm not sure what the issue is?
2 Replies
how are you sending it?
might have accidentally named it
id
instead of departmentId
?Yeah the name was off but would it still pass by query?
strangely enough, even though it works, I'm getting a 500 error on the front end