By creating a delete API endpoint, you allow the users to delete an entity if it is not necessary anymore or it is just dummy data. This way the users can create new entities without being afraid of not being able to delete the data.
- The only thing that we cannot do right now … in our app, … is to be able to delete an existing trip. … So that is what we're going to do now, … by creating an API Endpoint, … to delete data. … So, let's go to Visual Code and … see this in action. … In here go to the Controllers folder, … and then TripsController. … Scroll down to the bottom. … In here we are going to … create our new API Endpoint. … Since we want to delete data, … we are going to send an … HTTP DELETE request. … And the url in here is going to be … DeleteTrip. … As part of the url, … you're going to Trip ID as well. … So I'll just write in here, (id). … Now let's write … public IActionResult … DeleteTrip. … And then you will write (int id). … And then what we want to do … is that we just want to use the _service, … and then DeleteTrip. … We pass as a parameter, the Trip ID, … which is (id), in this case. … And then we just return, ok(). … Now, let us go to our service, … so go inside Data, Services, TripService, … then, …
- 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.