Course Overview
Master the fundamentals of building and consuming RESTful APIs in this comprehensive beginner to intermediate course. Whether you're new to Web APIs or transitioning from traditional ASP.NET, you'll gain a solid foundation in creating professional APIs that follow industry best practices.
Why This Course Is Different:
This isn't just another theory-heavy tutorial. You'll build a real, complete application from scratch, following the same patterns and practices used in professional development environments. By the end, you won't just understand APIs—you'll have built, secured, validated, versioned, and documented one with modern tools.
This course is fully updated for .NET 10 and uses Scalar documentation—the modern, next-generation alternative to Swagger UI. You're learning with cutting-edge tools that represent the future of API documentation, not outdated approaches from years ago.
What Makes This Course Unique:
Unlike other courses that teach APIs in isolation, you'll see the complete picture: building the API, implementing proper validation, securing it with authentication, versioning it for real-world scenarios, documenting it beautifully with Scalar, and then consuming it in a full ASP.NET Core MVC web application. This end-to-end approach gives you the foundational skills that prepare you for professional development environments.
What You'll Learn:
Start with the fundamentals of RESTful API design and build a complete Web API from the ground up. You'll master all four HTTP methods (GET, POST, PUT, DELETE) and understand when and how to use each one effectively in real-world scenarios.
Implement robust validation in your API using Data Annotations and custom validation logic. You'll learn how to validate incoming requests, return proper error responses, and ensure data integrity at the API level—a critical skill that many courses overlook.
Work with Entity Framework Core and Code First migrations to manage your database schema. You'll learn how to design models, create migrations, seed data, and maintain your database structure as your application evolves.
Secure your API with Authentication and Authorization, implementing JWT tokens and role-based access control to protect your endpoints. You'll understand the difference between authentication and authorization and implement both correctly, ensuring only authorized users can access protected resources.
Implement API versioning strategies to manage your API evolution gracefully. Learn how to introduce new versions while maintaining backward compatibility for existing clients—an essential skill for any API developer.
Document your API professionally using Scalar documentation, the modern successor to Swagger UI. Scalar provides a beautiful, interactive, and user-friendly documentation experience that makes your API accessible and easy to understand. You'll learn why Scalar is rapidly becoming the industry standard for API documentation.
Build a complete ASP.NET Core MVC Web Application that consumes your API using HTTPClient with the Services. This is crucial—many courses teach you to build APIs but skip the consumption part. You'll implement the entire flow: making HTTP requests from your MVC controllers, handling responses, managing authentication tokens, displaying data in views, and handling validation errors gracefully in the UI.
Who This Course Is For:
This course is perfect for developers who want to break into API development and build a strong foundation. Whether you're building your first API or want to learn modern best practices with the latest tools like Scalar, you'll gain practical, hands-on experience you can build upon.
Why These Skills Matter:
In professional development, APIs must be validated, secured, versioned, and well-documented. Knowing how to consume APIs from web applications is equally important. This course teaches you both sides—building solid APIs and integrating them into real applications—giving you the essential foundation that prepares you for more advanced concepts.
Complete Learning Resources:
All source code and exercise solutions are available on GitHub, so you can reference the complete working code anytime. Details are provided in the "PROJECT RESOURCES" lecture.
Your Path Forward:
This is Part 1 of a two-part series designed to take you from fundamentals to advanced concepts. After completing this course, you'll have a solid foundation in API development with validation, authentication, versioning, and modern documentation. You can then continue to Part 2, where we'll build on this same project with advanced features like refresh tokens, file uploads, dynamic base services, advanced exception handling, and Azure deployment strategies—transforming your API into a truly production-ready application.
Build your foundation today and set yourself up for success in modern .NET API development!
FAQ
FAQ area empty
Course curriculum
Chương 1 Section 1 - Welcome 10 bài · 30 phút
- Welcome Học thử 2:54
- What we will cover in Part 1 (Beginners Guide) Học thử 3:10
- What we will cover in Part 2 (Advanced Guide) Học thử 2:41
-
Get most out of the course
-
What we will build? 2:32
-
What is an API? 4:27
-
Request and Response 4:47
- Request object Học thử 4:13
- Response object Học thử 5:24
-
Course Content and Source Code
Chương 2 Section 2 - Introduction 9 bài · 28 phút
- Create Project Học thử 1:39
-
Add Scalar 4:24
-
Make Scalar UI default Url 1:00
- Code cleanup Học thử 1:43
-
Create First API Controller 2:00
-
First Endpoint in Action 3:09
-
Route Name 4:11
-
Route Parameter Binding 3:51
-
Parameters of API 5:55
Chương 3 Section 3 - Database Connection 4 bài · 17 phút
-
Install NuGet packages 3:10
-
Setup Db Context 4:51
-
Create Table 3:06
-
Seed Villa Table 5:30
Chương 4 Section 4 - API Endpoints 10 bài · 39 phút
-
Get Villas from Database 2:16
-
Better Approach 2:46
-
Optimize Get Villa by Id 4:34
-
POST Endpoint 3:27
-
POST in Action 3:55
-
DTO 5:02
-
Auto Mapper 4:17
-
Return Type for Resource Created 2:20
-
Update in Action 8:17
-
Delete in Action 2:13
Chương 5 Section 5 - Validations 10 bài · 42 phút
-
Custom Validation 2:45
-
Why we need uniform response 1:39
-
API Response 1:41
-
Never Return Database Entity 4:04
-
Return API Response 3:43
-
Static Factory Methods 7:30
-
Return API Response Part 1 4:37
-
Return API Response Part 2 7:52
-
API in Action 3:09
-
Response Type 5:15
Chương 6 Section 6 - Authentication 17 bài · 58 phút
-
Create Local User Table 3:17
-
Authentication DTO 3:50
-
Auth Controller 3:04
-
Auth Service Interface 2:30
-
Check Email Uniqueness 2:31
-
Register Service 3:14
-
Registration API Endpoint 4:16
-
Register API - Demo 2:17
-
Login Service 2:48
-
Generate Jwt Token 7:40
-
Login API Endpoint 3:27
-
Login API - Demo and Token 3:10
-
Add Authentication Middleware 7:19
-
Authentication in Action 2:19
-
Add Authentication to Scalar 2:49
-
Controller level authorization 2:45
-
Clean Up 0:17
Chương 7 Section 7 - API Assignment 5 bài · 24 phút
-
Assignment Setup 4:21
-
Assignment - DTOs 3:35
-
AutoMapper Rules 3:04
-
Get and Create Endpoints 5:47
-
Final Demo 7:25
Chương 8 Section 8 - Consuming API 12 bài · 39 phút
-
Create Project 1:12
-
Restructure DTO 4:37
-
API Request Model 2:09
-
Base Service Interface 2:51
-
Implement Base Service 6:51
-
Villa Service Interface 2:15
-
Implement Villa Service 6:26
-
Add CORS in API 1:17
-
Add AutoMapper 1:09
-
Register HttpClient 3:03
-
Villa Service in Home Controller 3:18
-
API Call in Action 3:42
Chương 9 Section 9 - Villa Web UI 11 bài · 45 phút
-
Home Page Design Part 1 5:12
-
Home Page Design Part 2 5:36
-
Villa management in navbar 2:16
-
Villa List Part 1 2:39
-
Villa List Part 2 3:09
-
Villa Create Template 2:42
-
Validations in Create Villa 4:40
-
Create in Action 4:50
-
Show villa to delete 7:29
-
Delete in Action 2:52
-
Edit in Action 3:34
Chương 10 Section 10 - Auth UI 16 bài · 60 phút
-
Auth Service Interface 2:08
-
Auth Service Implementation 2:08
-
Auth Controller 5:09
-
Login and Register UI Templates 3:30
-
Register View 6:03
-
Login View 2:09
-
Registration in Action 1:53
-
Sign In no working 7:15
-
Add Authentication to Web Project 4:07
-
Logged in User 3:58
-
Logout in Action 1:09
-
Authentication not working with API 4:40
-
Add Token to Session 3:49
-
Token in Action 4:15
-
Role based access 5:05
-
Clean Up 2:12
Chương 11 Section 11 - Versioning 9 bài · 35 phút
-
Restructure Files 3:31
-
Different routes for different version 2:57
-
Add Multiple Documents 4:03
-
Show Multiple documents in scalar 3:06
-
Add Versioning 5:00
-
Multiple Documents 7:16
-
Versioning in Action 6:22
-
Neutral Version 2:08
-
Better structure 0:55
Chương 12 OLD Course (.NET 7) - Introduction 1 bài
-
Project Resources
Requirment
-
6months knowlege of C#
-
3-6 months knowledge of NET Core
-
Visual Studio 2022/2026
-
SQL Server 2018+
-
.NET 10
Outcomes
-
Learn basic fundamentals of ASP NET Core Web API
-
Build RESTful API's in .NET 10
-
Learn how to document an API
-
Versioning in an API
-
Implement Repository Pattern in API to database using EF
-
Implement Authentication and Authorization in API and Consume API
-
.NET Identity to Authenticate API
-
Integrate Entity Framework along with code first migrations
-
Dependency Injection in .NET API
Instructor
Bhrugen Patel - (DotNetMastery | Microsoft MVP | 300k+ Students)
0.0
-
0 Student
-
4 Courses
-
0 review
View Details