Ok, so first things first I’m generally new to ASP.NET MVC and although I’ve managed to get around things I’m starting to hit road blocks that require some more advanced help
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (4)
My problem is the the id value I give to the the property of my object does not get stored from my view, I have tried to pass it as a hidden property but either I’m doing it wrong or it’s not an actual thing you can and I have even attempted to add the object to my database pass the object to the the page and then update it again once it hits the post which again didn’t work or I’m doing incorrectly. Any help would be great. Thanks in advance
Hey Gustavo,
Few questions
I’m using SQL Server attached to a ASP.NET Core MVC Project in my [Get] Create method I passing an I’d from an index view. So far I’ve managed to pass it from the get to the create view and onto the post create but now I’m having problems where the table I have is not accepting the keys . I’m not sure what I’m doing
Okay. So what I understood from this is
Are you using entity framework ?
About keys , if this key is marked as identity key in your sql table design, it cannot be modified explicitly through ef because it is generated by the table itself .You can set it to be ignored through the builder options.