Create a ASP.NET core MVC controller to create our web API service.
- [Instructor] Let's create a controller which will have…a route that will provide our messages for our front end.…We will begin by creating a new controller called…message controller.…Let's right-click on our Controllers folder.…And we'll select Add Controller.…If you get this dependency prompt, just select…Minimal Dependencies and press Add.…Now that the dependencies are set up, we can go ahead…and add the controller one more time.…In the next prompt, let's select API Controller.…Since we are using Angular for our front end…and won't require an MVC Controller.…
Make sure to select Empty since we'll be building…all of our routes manually, then hit Add.…We'll call our controller Messages Controller.…And I'll press Add.…Let's take a look at what was created.…We can see some defaults are already in place…such as in Line 10, where it specifies that json will…be produced by this controller.…And below that, it specifies that the route will be…accessible through the URL api/Messages.…Let's create our first getRoute function.…
Author
Updated
10/18/2017Released
5/9/2017- Setting up the app infrastructure
- Creating and configuring the Angular 2 project
- Displaying data in Angular
- Refining the layout
- Creating the ASP.NET Core project
- Creating a controller with ASP.NET Core
- Creating a nav bar
- Registering users
- Authorizing resources
Skill Level Intermediate
Duration
Views
Q: This course was updated on 10/18/2017. What changed?
A: The following topics were updated: setting up the app infrastructure, displaying data in Angular 2, getting data from ASP.NET Core, creating a controller with ASP.NET Core, and authorizing resources.
Related Courses
-
Deploying ASP.NET Core Applications
with Nate Barbettini57m 57s Intermediate -
Learning ASP.NET Core MVC
with Jess Chadwick3h 12m Intermediate -
Building Web APIs with ASP.NET Core
with Chris Woodruff1h 7m Intermediate
-
Introduction
-
Welcome1m 6s
-
Using the exercise files1m 32s
-
-
1. Set Up the App Infrastructure
-
Demo application overview1m 10s
-
Architectural overview1m 24s
-
-
2. Display Data in Angular
-
Create the component6m 24s
-
Show data3m 22s
-
Refine the Layout8m 47s
-
-
3. Get Data from ASP.NET Core
-
Creating a service3m 24s
-
4. Creating a Controller with ASP.NET Core
-
Sending our data to ASP.NET2m 23s
-
Saving data to a list2m 7s
-
-
5. Creating a Form in Angular
-
Creating the component6m 33s
-
Getting our input data5m 17s
-
-
6. Navigate with Router
-
Create a nav bar2m 44s
-
Navigate to a different view4m 10s
-
Add a messages route2m 49s
-
Pass a route parameter3m 40s
-
Retrieve a route parameter1m 17s
-
-
7. Reactive Programming
-
HTTP GET with Observable6m 6s
-
-
8. Creating Reactive Forms in Angular
-
Create a register layout5m 29s
-
Validate with reactive forms7m 21s
-
-
9. Registering Users
-
Save messages and users6m 19s
-
Store a token with Angular1m 42s
-
Log out2m 45s
-
10. Logging In
-
Create the login services11m 50s
-
11. Authorizing Resources
-
Get user information3m 59s
-
Add claims to our token3m 7s
-
Edit user in Angular6m 59s
-
-
Conclusion
-
Next steps31s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Creating a service