English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 145 lectures (28h 35m) | 9.51 GB
Learn to build a RESTful API and consume it in a Blazor (WebAssembly and Server) Client Application and deploy to Azure
Learn how to build a RESTful API using ASP.NET API using the latest .NET 6, Entity Framework, the Repository Pattern and various other tools and services for testing and logging; and later consuming it in a modern Blazor App. This complete course will show you how to use Visual Studio, Microsoft SQL Server Express and explore developing, consuming, testing and hosting a REST API in a Blazor Client application.
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. It’s suite of frameworks allow us to develop RESTful APIs and now thanks to Blazor, build robust client apps to interact with our API.
RECENT UPDATES
Since ASP.NET Core 6 became available with Visual Studio 2022, this course has been updated to use the technologies Visual Studio 2022 and .NET 6 in development.
Otherwise, everything in the project will work just the same if you are not inclined to upgrade, and I constantly highlight alternative code for .NET 5 and .NET Core 3.1 where applicable.
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 for 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, so that 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 Database to support our API.
Azure Static Web Apps is a service that allows you to deploy both JavaScript apps but now also Blazor apps. The service is simple to use as it only requires an Azure subscription and a GitHub repo. That’s all we need.
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 (or NLog in .NET 5 Version)
- Setup API documentation using SwaggerUI
- Understand the REST design principles
- Understand C# 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
Table of Contents
Introduction
1 Introduction
2 Pending Content Refresh and Updates
Environment Configuration and Account Setup
3 Install Visual Studio 2022 Community Edition
4 ALTERNATIVE – Install Visual Studio 2019 Community Edition – .NET 5
5 Install SQL Server Express Edition
6 Create a GitHub Account
7 Install and Explore PostMan
Project Setup and Configurations
8 Create .NET 6 Web API Project
9 Tour of Project Structure and Files
10 Configure Logging using Serilog
11 CORS Configuration
12 Review and Add Changes to GitHub
Setup and Scaffold Database
13 Create Database in SQL Server
14 Scaffold Database
15 Review and Add Changes to GitHub
Setup Author API Controller and Functionality
16 Section Overview
17 Setup API Controller
18 Setup AutoMapper and DTOs
19 Add Logging to Controller
20 Review and Add Changes to GitHub
Setup Book API Controller and Functionality
21 Section Overview
22 Setup API Controller
23 Setup AutoMapper and DTOs
24 Review and Add Changes to GitHub
Configure Identity and JWT Authentication
25 Section Overview
26 Add Identity Core Libraries and Tables to API
27 Add Custom Fields to User Table
28 Seed Test Users and Roles
29 Setup Authentication Controller
30 Setup JSON Web Tokens (JWT) Authentication – Part 1
31 Setup JSON Web Tokens (JWT) Authentication – Part 2
32 Setup Controller and Action Authorizations
33 Review and Add Changes to GitHub
Create Blazor Server Client App
34 Section Overview
35 Create and Understand Blazor Project Structure
36 Setup HTTP Client Using NSwag Studio
37 Setup User Registration
38 Setup User Login – Part 1
39 Setup User Login – Part 2
40 Review and Add Changes to GitHub
Author Management Blazor UI
41 Section Overview
42 Setup Authors Index
43 Extend HTTP Client
44 Setup Create Author Component
45 Setup Update Author Component
46 Setup View Author Component
47 Delete Author with JavaScript Interop
48 Add Authorization Restrictions
49 Review and Add Changes to GitHub
Book Management Blazor UI
50 Section Overview
51 Setup Book Management Service Methods
52 Setup Books Index Component (With Delete Functionality)
53 Setup Create Book Component w File Upload – Part 1
54 Setup Create Book Component w File Upload – Part 2
55 Setup View Book Component
56 Setup Update Book Component
57 Review and Add Changes to GitHub
Create Blazor WebAssembly Client App
58 Blazor WebAssembly Introduction
59 Tour Blazor WebAssembly Project
60 Transferring Blazor Server Code to Blazor WebAssembly
61 Progressive Web Application
62 Review and Add Changes to GitHub
UI and Architectural Considerations
63 Implement Repository Pattern
64 Virtualization
Project Setup and Configurations – OLD COURSE
65 Create .Net Core Web API Project
66 Tour of Project Structure and Files
67 Why Web Razor and not Web API Template
68 Configuring and Using Swagger UI
69 Configure Logging using NLog
70 CORS Configuration
71 Review and Add Changes to GitHub
Implement Database and Repository Pattern – OLD COURSE
72 Create Database in SQL Server
73 Implement Data Classes and Entity Framework
74 Scaffold-DbContext Command
75 Setup AutoMapper and DTOs
76 Review and Add Changes to GitHub
Setup Author API – OLD COURSE
77 Setup Repository and Service
78 Scoped vs Singleton vs Transient
79 Setup API Controller
80 Setup GET Endpoints
81 Setup CREATE Endpoint
82 Setup UPDATE Endpoint
83 PUT vs PATCH
84 Setup DELETE Endpoint
85 Review and Add Changes to GitHub
Setup Book API – OLD COURSE
86 Setup Repository and Service
87 Setup API Controller
88 Setup GET Endpoints
89 Setup CREATE Endpoint
90 Setup UPDATE Endpoint
91 Book Update DTO
92 Setup DELETE Endpoint
93 Review and Add Changes to GitHub
Configure Authentication and Identity – OLD COURSE
94 Scaffold Identity Tables to Existing Database
95 Seed Test Users and Roles
96 Setup Users Controller
97 What is JWT-based Authentication
98 Setup JSON Web Tokens (JWT) Authentication
99 Setup Controller and Action Authorizations
100 Review and Add Changes to GitHub
Create Book Store UI Project – Blazor Server – OLD COURSE
101 Create and Understand Blazor Project Structure
102 What Is Blazor
103 Setup HTTP Client And Service Repositories
104 Setup User Registration API Endpoint
105 Setup User Registration Form
106 Setup User Login – Extend Blazor Authentication Provider
107 Setup User Login – Form and Logic
108 Review and Add Changes to GitHub
Author Management Blazor UI – OLD COURSE
109 Setup Author Repository and Service
110 Setup List Authors
111 Setup View Author
112 Setup Update Author
113 Setup Delete Author
114 Setup Create Author
115 Essential Layout Fixes and Additions
116 Fix Author-Book JSON Response
117 Review and Add Changes to GitHub
Book Management Blazor UI – OLD COURSE
118 Setup Book Repository and Service
119 Setup List Books
120 Setup View Book
121 Setup Create Book – Part 1
122 Setup Create Book – Part 2
123 IMPORTANT – IMAGE UPLOAD FIX
124 Setup Update Book
125 Setup Delete Book
126 Essential Layout Fixes and Additions
127 Review and Add Changes to GitHub
Blazor WebAssembly
128 Blazor WebAssembly Introduction
129 Transferring Blazor Server Code to Blazor WASM
130 Modify Code for Blazor WebAssembly
131 Essential Layout Fixes and Additions
132 File Upload Support (Create and View)
133 File Upload Support (List and Edit)
134 Progressive Web Application
135 Review and Add Changes to GitHub
Upgrade From ASP.NET Core 3.1 To .NET 5
136 Migrate Project to .NET 5
137 IMPORTANT – MainLayout Fix
138 Fix File Upload – Remove BlazoredInputFile
Deploy to Azure
139 Essential Code and Configuration Fixes
140 Create Microsoft Azure Account
141 Deploy Book Store API and Database
142 Deploy Blazor Server To Web App Service
143 Deploy Blazor WebAssembly To Azure Web App Service
144 Final Source Code
BONUS Section
145 Bonus Lecture
Resolve the captcha to access the links!