Closed 17steen closed 1 year ago
Same issue. Tutorial says that if I click on Track link button next to the order it will go to my orders/
Only problem is that I never get to have any orders as they never get to the back-end. It's very confusing.
@catalinp86 I haven't seen this issue. Mine works just fine. Could you share your repo?
@17steen true that save-point sections -even 1st- have the required attributes. That should be fixed so it matches the docs. However, I would encourage to follow the tutorial while save-points is fixed.
I will try again, a 3rd time, this time on another machine and see if I reproduce it again (initially, it was on the work computer, so no github). This time, I'll clone it on my machine, take the state at end of the session 2, place it in a public github repo and add the first steps in session 3. If the problem is still there I will push the changes and leave it as is.
@catalinp86 I haven't seen this issue. Mine works just fine. Could you share your repo?
@ylr-research I have repeated once again, the same process:
It adds up, because after submitting the pizza order, when I enter the MyOrders page, when the HttpClient attempts to get the list of Pizza orders it comes back with an empty list. That's abnormal.
This is the state on the server-side of orders.
PS: I apologize @ylr-research , if the repo isn't perfectly clean (source-code only), but I was on a little time, but I wanted to get back to you, since I need to get better at it for work and I was recommended this tutorial.
I met same problem, and somehow magically it solved by itself. Firstly, I commented Address.cs as in 3rd save point and began to compare code lines of 3rd and then 2nd save points in debug mode. Breakpoints was chosen to check orders variables (as @catalinp86 mentioned), and I didn't find any obvious differences, BUT in debug mode the 2nd save point surprisely start working as expected in tutorial. It's worth noting, that I launched debugging during whole day, but issue was resolved only after put breakpoints and checking lines step by step. Strange bug.
Anyone still struggling, the solution would be to comment out model validation attributes in BlazingPizza.Shared.Address.cs and re-create the database (just delete pizza.db and re-start the app).
I'll test that out @rzmz
Thanks very much for this @17steen and @rzmz. I experienced the same issue as @catalinp86 . Commenting out model validation attributes didn't work initially but as you said re-creating the database got it all working again. Much appreciated.
Yes, I think we need to roll-back the initial requirements attributes in Address.cs as a recommended fix to this
Just wanted to add I only created a new PR because I couldn't figure out how to contribute to the existing one that's 27 days old and is missing changes to save-points 01 and 02.
save point 2 Address.cs, in this file, required fields are defined. Those do not get filled up at any point by the Client, but the server will expect them, when the order is placed, to be filled in. This however never gets mentioned, and the tutorial goes on to lesson 3, which will then never work because the orders do not get added to the database. It gets very confusing as you then think to start from the following save point, and now it magically works. This is the result of those constraints to now be commented, without it being shown in the tutorial. This lead the learner to have a considerably lengthy headache not understanding what they did wrong. save point 3 Address.cs