Creating or adding new data is the first API endpoint that you are going to implement. In this video, learn how to create your first API endpoint used to add or create new entities.
- [Instructor] Now that we created our service … and we set up the data file, … it's time to create our first API endpoint, … and we are going to start with the Create API endpoint. … In here, go to the Controllers folder … and create a new file. … We are going to name this controller TripsController, … so TripsController.cs. … Let us next define the namespace … and the namespace is going to be … namespace Trips.controllers. … Now inside here, let us create the C# class. … So for that we just write public class TripsController, … but for this class to be a controller, … we need to inherit from the base class Controller. … Let us import the namespace, … so control dot, … import the AspNetCore.Mvc, … and inside this class, the first thing that we need to do … is that we need to create a constructor … so then we can inject the service … to be able to use it in our endpoints. … So the shortcut for that would be ctor then double tab. … Let's change the class name to TripsController, … and then inside here, …
- Setting up the app infrastructure
- Creating data models
- Creating, reading, updating, and deleting API endpoints
- Testing API endpoints using Postman
- Reading data from React
- Adding new data from React
- Handling errors
- Implementing Redux in an existing React app
- Implementing authentication in your React app
Skill Level Intermediate
Managing App Secrets in .NET Corewith Ervis Trupja28m 15s Intermediate
1. Setting Up the App Infrastructure
2. Setting Up Web API
3. Getting Started with React
4. Implementing Redux to an Existing React App
5. Implementing Authentication in Your React App
Where to go next44s
- 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.Cancel
Take 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.