Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Building and Securing Web APIs with ASP.NET Core

Packt via Coursera

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This course features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. This course is designed to help developers master the creation and protection of Web APIs using ASP.NET Core. You’ll gain hands-on experience with scaffolding, data validation, DTO implementation, and API security, building confidence to design scalable and secure backend systems. By combining theory with practical coding exercises, you’ll develop a strong foundation in API development best practices. The course begins with scaffolding database-driven API endpoints for countries and hotels, guiding you through controller generation, testing, and refactoring for optimal performance. You will then learn to implement DTOs for data shaping, validation, and security, improving your API’s reliability and structure while reducing potential vulnerabilities. Next, you’ll dive into implementing a service layer, exploring dependency injection, AutoMapper, and the Results Pattern to organize business logic and standardize responses. Advanced security topics follow, covering authentication mechanisms, JWT, API keys, roles, and authorization policies, ensuring your APIs are protected against common threats. You will also implement hotel booking functionality, integrating RESTful principles, user and admin booking management, advanced validation, and thorough testing. Finally, the course explores advanced architecture concepts, including project layout patterns, separate core, data, and application layers, and the Options Pattern, equipping you to build maintainable and scalable APIs. By the end of the course, you will be able to scaffold and secure database-driven API endpoints, implement DTOs for data validation and shaping, design a robust service layer with dependency injection and AutoMapper, apply multiple authentication schemes and authorization policies, and structure a scalable API architecture following best practices in ASP.NET Core.

Syllabus

  • Scaffolding Database-Driven API Endpoints (Countries)
    • In this module, we will introduce scaffolding in ASP.NET Core and demonstrate how it accelerates API development. You will scaffold controllers for countries data, review the generated code, and refine it for efficiency. The module concludes with hands-on testing to ensure your endpoints work flawlessly.
  • Scaffolding Database-Driven API Endpoints (Hotels)
    • In this module, we will scaffold API endpoints for hotel data and explore how related database data affects API design. You will implement, test, and refine endpoints to handle complex relationships efficiently. By the end, your hotel APIs will be both functional and optimized for real-world use.
  • Implementing DTOs for Data Shaping, Validation, and Security
    • In this module, we will explore DTOs and their importance in shaping, validating, and securing API data. You will implement DTOs across country and hotel endpoints and refactor controllers for clean, maintainable responses. The focus is on improving data integrity and controlling what your API exposes.
  • Implementing a Service Layer
    • In this module, we will introduce the service layer and its benefits for organizing API business logic. You will learn Dependency Injection, implement AutoMapper, and apply the Results Pattern to standardize responses. The module concludes with testing and optimization to ensure a robust, scalable API architecture.
  • Implementing API Security
    • In this module, we will focus on securing your ASP.NET Core API using various authentication and authorization techniques. You will implement Identity, JWT, API keys, and role-based controls. Comprehensive testing ensures your endpoints are protected and compliant with best security practices.
  • Hotel Bookings
    • In this module, we will develop a full-featured hotel booking system within your API. You will build endpoints, implement business logic, secure access, and validate data. Thorough testing ensures a reliable booking experience for both users and administrators.
  • Advanced Architecture Concepts
    • In this module, we will explore advanced architectural patterns for ASP.NET Core APIs. You will learn to structure core, data, and application layers, manage configurations, and enhance maintainability. The module concludes with testing to verify that your architecture supports robust, scalable applications.

Taught by

Packt - Course Instructors

Reviews

Start your review of Building and Securing Web APIs with ASP.NET Core

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.