See how you can use the scaffolding tools in Visual Studio to automatically create a controller to read, create, update, and delete an Entity Framework entity.
- [Instructor] We just looked at using DTOs in your API,…but sometimes you do want to create a very generic API…that exposes all of the basic CRUD operations,…that is C-R-U-D, create, read, update, and delete,…and you wanna expose those more directly with your entities…instead of using purpose built APIs with DTOs.…Let's look at some very cool tooling that's built…into Visual Studio that makes building entity framework…based API controllers very easy to do.…
In Visual Studio, we're going to build a new controller…using some built in tooling that helps us…automatically scaffold new API controllers…using entity framework entities.…We'll start by right clicking on the controllers…and picking add controller, then we'll select…the option called web API two controller…with actions using entity framework.…That's a pretty long name,…so let's break that down a little bit.…First, we're asking Visual Studio to create a new controller…using the web API framework as opposed to MVC for example.…
Next, we're asking Visual Studio to create…
AuthorJonathan "J." Tower
- Convention-based routing
- Binding your code to an HTTP request
- Validating models
- Using attributes to route requests
- Customizing attribute routes
- Data serialization and model binding
- Error handling
- Using exception filters and exception loggers
- API documentation and testing
- Securing your API
Skill Level Beginner
ASP.NET MVC: HTTP Request Life Cyclewith Janan Siam2h 15m Advanced
1. Controllers and Actions
3. Data Serialization and Model Binding
4. Error Handling
5. API Documentation and Testing
Next steps1m 38s
- 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.