I am a retired IT dinosaur who wants to learn this new technology. I started by watching the excellent Pluralsight courses on MVC 4 and MVC 5, and then built the tutorial exercise in the title of this post from the page docs.asp.net.
When I run it on my PC, I see the list of books as demonstrated in the tutorial. In order to see how the application works, I edited a book. When I click the "Save" button, the application crashes. It appears to be executing two methods: .SaveChanges() and .Update() in the controller to update a row , but the primary key is not set.
My education will undoubtedly teach me what's wrong. My question is: Shouldn't the generated application do these simple things "out of the box"?
EDIT: I have been advised to make it easier to look at this problem by providing more detail:
- Go to https://docs.asp.net/en/latest/
- Click Tutorials in LHS menu
- Click topmost dot point (link) Your First ASP.NET 5 Web App Using Visual Studio
- Follow instructions as far as displaying a list of books (this took me about 10-15 minutes)
- Click "Edit" on any book and attempt to make a change and save. Application crashes.
Hope this helps.