
Design a RESTful API with C# and .NET, apply Swagger or OpenAPI specifications, and deploy to Azure, while building a Blazor UI for a bookstore app that handles authentication.
Install Visual Studio 2022 Community Edition from visualstudio.com, run the installer, and select web development (ASP.NET) workload along with dotnet six; customize themes and sign in with a Microsoft account.
Discover how to install Visual Studio 2026 insider preview, choose workloads like ASP.NET web development and Maui, and leverage AI features and GitHub Copilot chat for streamlined development.
Install SQL Server Express on your machine, choosing the free development edition. Set up SQL Server Management Studio (SSMS) and an instance to manage and connect to your databases.
Create a GitHub account in minutes by signing up with your email and password, verify with a code, and explore profiles, repositories, backups, and team collaboration.
Install and explore Postman to test your api endpoints, using http verbs and workspaces, and inspect json responses and status codes from free api endpoints.
Create a blank solution named bookstore app in Visual Studio 2022 to build a dotnet 6 ASP.NET Core web API project, then enable OpenAPI and swagger for testing.
Walk through the generated api project structure in a .NET 6 solution, including csproj, dependencies, launch settings, appsettings.json, and the weather forecast controller.
Configure serilog for an ASP.NET Core API by wiring Program.cs to appsettings.json, install the library, and write logs to a daily rolling file with seek.
Configure a 'allow all' course policy to permit any method, header, and origin, then apply it in the app middleware to enable cross-origin access during development.
Learn to add Blazor and API project to source control, create and push a public GitHub repository named bookstore app Blazor net six, and track changes on the master branch.
Learn the database-first approach by creating a bookstore SQL Server database in Visual Studio, defining authors and books with keys and foreign keys, and wiring it to Entity Framework Core.
Connect your app to sql server using entity framework, add ef core packages, configure appsettings.json with a connection string, and scaffold a db context, then explore code-first and database-first migrations.
Add entity framework core and scaffold the database, creating a db context and objects. Commit changes with a descriptive message, then push to the master branch.
Set up the first API endpoint to manage the author class stored in the database, enabling requests and responses to interact with author data.
Learn to scaffold an authors API controller with entity framework, inject the db context, and expose get, post, put, and delete actions with swagger.
Implement DTOs and AutoMapper to map author create, update, and read models, enforce API validations, and streamline data transfer between clients and the database.
Learn to implement robust error handling and logging using Serilog and Seq, including try-catch flows, friendly client messages, and avoiding exposure of internal exceptions.
We set up our first controller and replace the entity class with data transfer objects. We implement Automapper, configure mapping, and commit changes to GitHub.
set up book endpoints for the API, mirroring the authors CRUD with Automapper and logging, while bootstrapping context to talk to the database and exploring abstraction for production readiness.
Scaffold an API controller for books using Entity Framework, wired to the data context, test endpoints in Swagger, and prepare for detailed business rules and AutoMapper integration.
Master setting up AutoMapper and DTOs for a book listing API, including read-only and detail DTOs, with include and projection for efficient EF Core queries.
Review and refine the two controllers, noting optional logging and try/catch enhancements, and commit and sync your changes with a descriptive message, prepare to tackle authentication and authorization next.
Set up authentication and authorization for the API using Microsoft's identity library and JWT, to verify clients and grant access based on tokens in a stateless API.
Install identity core and EF core, configure identity with IdentityUser and roles, wire EF stores to the db context, generate and apply migrations to add identity tables to the database.
Extend user model by creating an API user that inherits identity user and adds first and last name, then update identity context to use it and run a migration.
Seed test roles and users with entity framework during migrations, configuring identity roles and api users, hashing passwords, and assigning users to roles via identity user roles.
Set up an API authentication flow by building an auth controller with register and login endpoints, using data transfer objects, identity user manager, role assignment, and validation.
Learn to implement json web token authentication for an api, covering issuer, audience, and token lifetime, and configure Program.cs with JWT bearer and token validation using appsettings and secrets.
Implement jwt-based authentication by generating a token with claims, signing credentials, issuer and audience, and returning an auth response containing the token and user details. Validate 401 unauthorized and 403 forbidden responses, and test with jwt.io to verify claims like sub, email, uid, and roles.
Apply the authorize attribute to controllers to require bearer tokens for all actions. Distinguish roles, such as administrator, to gate create, update, and delete operations.
Configure authentication and identity with JWT, extend identity and user tables, and commit changes as we prepare to build a Blazor Server client to consume the API.
Explore Blazor development with webassembly and server models, enabling client apps on the Dotnet stack using C#. Build a Blazor Server app and tour its folder layout.
Create a Blazor server app in Visual Studio, understand the project structure with razor components, pages, and shared components, and compare server and webassembly approaches.
Generate a C# HttpClient with NSwag Studio from Swagger/OpenAPI, wiring an IClient implementation and base address, using generated DTOs to call API endpoints.
Create a Razor component for registration at /users/register, bind a user dto to an edit form with Bootstrap styling, validate inputs, submit via the generated service client, and handle errors.
Set up login in a Blazor app with a login form connected to the API via HttpClient. Store the JWT token in local storage and update the API authentication state.
Implement cascading authentication state in a Blazor app, gate routes with authorize root view, redirect unauthenticated users to login, and manage token-based auth via API provider and local storage.
Review the completed Blazor server app and its authentication setup, including login and registration, the server versus WebAssembly tradeoffs, and the generated typed API client powered by the OpenAPI document.
Build author management screens in Blazor, performing create, read, update, and delete operations while integrating with the API, and toggle between UI design and API design roles.
Create an authors index page in a Blazor app, load author data via a service client, and build a Bootstrap table with actions while securing access with an authorized view.
Extend the http client by building a base http service and response wrapper to attach bearer tokens and centralize api error handling for author-related calls.
Create a Razor author create component to collect first name, last name, and biography, validate input, and submit to the author service with navigation back to the list.
Develop and wire an update author component in Blazor, extending the contract, fetch author by id, map to update DTO with AutoMapper, and submit the update.
Implement the author details page using a read-only form and pass the author id. Extend the API to include the author's books and render them in cards.
Learn to delete an author in a Blazor app with JS interop, including a delete button, confirm dialog using IJSRuntime, bearer token auth, and refreshing the author list on success.
Implement role-based authorization in a Blazor app by wrapping create, update, and delete actions in an authorized view and guarding routes with an administrator role.
Extend the Blazor app by upgrading the service client, and overriding non-200 responses, and create a data wrapper for author data, while exploring JS interop, component navigation, and book crud.
Master book management CRUD operations, mirroring author management across API and app, including image uploads and linking books to authors during creation.
Clone author service to set up book service methods, adapting data types and create, read, update, delete logic for books, including file upload. Inject iBookService and prepare the books index.
Set up a books index component in Blazor using the book service, display a table with image, title, price, and author, and implement delete with admin authorization.
Create a Blazor book creation page at books/create with administrator role authorization, an edit form, data annotation validation, an author dropdown, and a file upload that converts images to base64.
Finish the create book form and implement server-side file upload for book covers, saving base64 images to a filesystem path with unique names and returning a URL.
Create a book details view by reusing the edit form, display the cover image, title, ISBN, price, year, summary, and author, and provide edit or back-to-list navigation.
Learn to implement a Blazor edit book component by reusing the create form, handling image uploads, and updating the API with book update DTOs, validations, and UI tweaks.
Validate and commit basic CRUD changes on the authors and books navigation, test the details view with the correct IDs, and prepare for reusable components and improved error handling.
Overview
Learn how to build a RESTful API using ASP.NET Core 6 / 7, and then consume it in a modern Blazor Single Page Application. Along the way, we will review clean coding principles and patterns, RESTful Standards, logging tools, database development and management, and application testing and deployment strategies.
By the end of the course, we would have built a single-page application using Blazor (Server and WebAssembly) that will serve as a stand-alone client app, consuming and interacting with an API. We will look at handling authentication using JSON Web Token (JWT) and using this JWT to communicate with the API for all other operations that our app will support.
ASP.NET Core is Microsoft's modern, cross-platform framework for building enterprise-ready web applications. Its suite of frameworks allows us to develop RESTful APIs and now thanks to Blazor, build robust client apps to interact with our API.
Why Learn ASP.NET Core (.NET 6)
Microsoft .NET is the platform that drives the business technology of many of the top corporations in the United States and many other countries. It is the predominant technology used to drive enterprise-scale business technology. Companies have chosen .NET because of its proven scalability, reliability, and support.
The .NET language of choice to learn is C#, as it is among the most widely used languages today. It’s a general-purpose programming language that can handle almost any problem, from desktop to mobile to dynamic web applications. As such, there is a high demand across the world for .NET developers in a variety of industries, which means that more jobs are available for candidates with a foundation built upon .NET technologies.
Why Develop With Blazor?
The most popular JavaScript client-side web frameworks have been Angular, React, Vue and others. In this course, we keep it .NET by using Blazor, which is Microsoft's response to that monopoly.
Blazor allows you to create a Single Page Application, on top of .NET Core and continue coding in C# (without needing to flip between C# and JavaScript too much). Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries.
Blazor WebAssembly or Blazor Server
Blazor can run your client-side C# code directly in the browser, using WebAssembly. Because it's real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application.
Alternatively, Blazor can run your client logic on the server. Client UI events are sent back to the server using SignalR - a real-time messaging framework. Once execution completes, the required UI changes are sent to the client and merged into the DOM
We will be exploring many intricacies of the Blazor life-cycle, data flow, JavaScript Interoperability, and general development activities.
Deploy To Microsoft Azure Cloud
Azure Web App Service is key to deploying the API and Blazor Server Applications. We will also enlist the use of Azure SQL for the Database to support our API.
Build A Strong Foundation in .NET Core Programming:
Build a fully data-driven REST Web API using cutting-edge technology
Build a Single Page Application client-side UI using Blazor Server AND Blazor WebAssembly
Connect to an existing Database using Entity Framework Core
Repository Pattern and Dependency Injection
Progressive Web Application with Blazor
Setup Logging using Serilog
Setup API documentation using SwaggerUI
Understand the REST design principles
Understand C# 10 and .NET Core Web Syntax
Use NSwag to speed up API Client Development
Understand user Authentication using JWT (JSON Web Tokens)
Store JSON Web Tokens using Local Browser Storage
Handle Blazor Application User Authentication State
Consume REST Web API in Blazor Application
Understand how to use Models, DTOs and AutoMapper
Manage Packages with NuGet Manager
Setup GitHub for Source Control
Deploy Applications and Database to Microsoft Azure
PREREQUISITES
In order to take this course, you should have at least 3 months of experience programming in C#. If you need to strengthen your C# fundamentals, you can take my C# beginner course C# Console and Windows Forms Development with LINQ & ADO .NET. If you need to brush up on your web development skills, you may also review Introduction To Website Development Technologies to learn the fundamentals of HTML, CSS, and JavaScript.
Content and Overview
To take this course, you will need to have some knowledge of Object Oriented Programming, if not C#. Even if you have little exposure to the .NET development stack, this course is beginner-friendly and full of development tips.
This is a huge course. Over 16 hours of premium content, but smartly broken up to highlight a set of related activities based on each module in the application that is being built. We will also look at troubleshooting and debugging errors as we go along; implementing best practices; writing efficient logic and understanding why developers do things the way they do. Your knowledge will grow, step by step, throughout the course and you will be challenged to be the best you can be.
We don't do things the perfect way the first time; that is different from the reality of writing code. We make mistakes and point them out and fix them around them. By doing this, we develop proficiency in using debugging tools and techniques. By the time you have finished the course, you will have moved around in Visual Studio and examined logic and syntax errors so much, that it will be second nature for you when working in the .NET environment. This will put your newly learned skills into practical use and impress your boss and coworkers.
The course is complete with working files hosted on GitHub, with the inclusion of some files to make it easier for you to replicate the code being demonstrated. You will be able to work alongside the author as you work through each lecture and will receive a verifiable certificate of completion upon finishing the course.
Clicking the Take This Course button could be the best step you could take towards quickly increasing your income and marketability! Also, remember that if you don't think the course is worth what you spent, you have a full 30 days to get a no questions asked refund!
It's time to take action!
See you in the course!