"Id" is null in response in C# from Editor()
"Id" is null in response in C# from Editor()
wadeparallon
Posts: 84Questions: 9Answers: 0
in Editor
Even before getting to the JS, this is the first load (HttpGet)
This is the Database
And this is the model
I've originally did not have the .Set(false)
on the property, I was validating it to be NotEmpty
. I'm unsure why Id is not being populated. I've referenced the .net package and the jsonidcontroller and I've practically matched it.
I've searched around the forums and can't seem to find the issue.
This question has an accepted answers - jump to answer
Answers
Looking at SQL Profiler, it appears as though its in conflict with a default? There are two "id"s being queried.
Add
"Id"
as the third parameter to the constructor.The default is
id
, which is notId
, hence the issue. Telling the library what the correct name of the primary key is, should resolve this.Allan