From the course: Building Applications with Angular, ASP.NET Core, and Entity Framework Core
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Post quiz to back end
From the course: Building Applications with Angular, ASP.NET Core, and Entity Framework Core
Post quiz to back end
- [Narrator] This video will create the front-end and back-end API components to descend over our new quiz. Let's open up our API service. We'll start by copying the postQuestion from line 17 and then let's paste it below the last question function putQuestion on line 23 and we will rename it to postQuiz, and that will take in a quiz instead of a question. Then we'll change the URL, instead of questions, to quizzes since we'll assume we'll have a quizzes controller, and we'll pass in our quiz with that HTTP post as a second parameter. Next, let's go ahead and open up our back-end and stop the server. Then in our Solution Explorer, let's create a new quiz model. So, I'll simply copy and paste our questions model and let's rename it to quiz. And then we'll rename the class to quiz as well. Then I'll get rid of all the properties between line 12 and line 15 and change the Text property to Title, then I'll clean that up by removing the unused name spaces. Now that we have our quiz model…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
Create a quiz in Angular3m 48s
-
(Locked)
Post quiz to back end3m 38s
-
(Locked)
Challenge: Displaying quizzes39s
-
(Locked)
Solution: Displaying quizzes8m 25s
-
(Locked)
Loading questions from quiz2m 27s
-
(Locked)
Associate quiz to questions5m 5s
-
(Locked)
Showing only quiz owned questions4m 43s
-
(Locked)
Challenge: Quiz ID check31s
-
(Locked)
Solution: Quiz ID check2m 4s
-
-
-
-