
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 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 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.
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 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.
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.
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.
Generate a C# HttpClient with NSwag Studio from Swagger/OpenAPI, wiring an IClient implementation and base address, using generated DTOs to call API endpoints.
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.
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.
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.
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.
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.
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.
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!