Testing it up

Let's try our Controller by running our app in Debug Mode; in order to test it, we need to manually type the following URL in the browser's address bar:

http://localhost:<port>/api/quiz/latest/3

If we did everything correctly, it will show something like this:

Note how the ViewCount property is not present in the JSON-serialized output; that's by design, since it has been flagged with the JsonIgnore attribute, meaning that we're explicitly opting it out.

Our first Controller is up and running. Do not underestimate it! Eventually, it will be in charge of all quiz-related operations within our web application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.200.109