ASP.NET Core Web APIs from Scratch Online Course
ASP.NET Core Web APIs from Scratch Online Course
This course provides a comprehensive approach to building RESTful APIs using ASP.NET Core. It covers the essential concepts, including the Web API request workflow, HTTP status codes, and the various components involved in a Web API request. You will gain a deep understanding of API controllers, their attributes, and how to use them effectively in ASP.NET Core Web API development. Additionally, the course teaches how to build a RESTful API from scratch, work with different API return types, and understand the full range of Web API operations. Through a structured, step-by-step learning process, this course equips you with the skills to confidently implement APIs in your projects and apply best practices in ASP.NET Core Web API development.
Key Benefits
- Gain a comprehensive understanding of Web APIs in ASP.NET Core, including the Web API request workflow, HTTP status codes, and the key components of a Web API request.
- Develop expertise in handling essential Web API operations, such as GET, POST, PUT, and DELETE, for both collections and individual items.
- Follow a detailed, step-by-step process to build a new RESTful API, applying your knowledge to a case study for practical learning and hands-on experience.
Target Audience
This course is designed for backend web developers who work with APIs, whether by consuming or exposing them, as well as software architects looking to leverage API concepts to scale and improve distributed computing within their projects. A foundational understanding of RESTful API design, ASP.NET Core, and ASP.NET Core MVC is recommended for participants to fully benefit from the course content.
Learning Objectives
- Develop Web API operations such as GET, POST, PUT, and DELETE for managing both collections and individual items.
- Enhance your ASP.NET MVC Web API project by integrating AutoMapper for efficient data transformation and management.
- Implement model validation techniques to ensure data integrity and reliability.
- Gain hands-on experience in creating a new Web API project from the ground up.
- Master key API controller concepts, including the roles of controllers and attributes, and how they are applied in API development.
- Build and manage association APIs by implementing GET and POST operations for handling related data.
Course Outline
The ASP.NET Core Web APIs from Scratch Exam covers the following topics -
Module 1 - Introduction to Web API Development
- Overview of the Web API Request Lifecycle
- Understanding Web API Operations
- HTTP Status Codes: Key Concepts
- Introduction to CMS OpenAPI Documentation
- Step 1: Initiating a New Web API Project
- Key Components of a Web API Project
Module 2 - Understanding API Controllers
- What Are API Controllers?
- Role and Function of Attributes in API Controllers
- Importance of the ApiController Attribute
Module 3 - Building Collection APIs
- Introduction to Collection APIs
- Step 2: Create a New Controller
- Step 3: Define Actions in the Controller
- Step 4: Add Data Models to Your Project
- Step 5: Set Up a Database Repository
- Step 6: Integrating the Database Repository
- Step 7: Implementing GET Operations to Retrieve All Items
Module 4 - Exploring Return Types in Web APIs
- Introduction to Return Types
- Method 1: Returning Data Using the Type Directly
- Method 2: Returning Data Using IActionResult
- Method 3: Returning Data Using ActionResult
- Key Differences Between IActionResult and ActionResult
- Asynchronous Return of Results
- Step 8: Modify GET Operation to Utilize ActionResult
Module 5 - Enhancing Your Web API Project
- Introduction to Web API Improvements
- Step 9: Using AutoMapper to Map Data and DTOs
- Step 10: Implementing POST Operations for Adding New Items
- Step 11: Adding Validation to Models for Data Integrity
Module 6 - Creating Individual Item APIs
- Introduction to Individual Item APIs
- Step 12: Implement GET Operation to Retrieve a Single Item
- Step 13: Implement PUT Operation to Update Existing Items
- Step 14: Implement DELETE Operation to Remove Items
Module 7 - Working with Association APIs
- Introduction to Association APIs
- Step 15: Implement GET Operation to Retrieve Sub-Items
- Step 16: Implement POST Operation for Creating New Associations
Module 8 - Versioning Your Web API
- Introduction to API Versioning
- Different Methods of API Versioning
- Step 17: Implement API Versioning Service
- Step 18: Apply Versioning to Controllers
- Step 19: Apply Versioning to Actions
- Query-Based vs. URL-Based vs. Header-Based Versioning
- Step 20: Enable Multiple Versioning Methods