
Explore using Visual Studio Code to create a .NET MAUI Blazor hybrid web app by leveraging the create project feature, selecting the Blazor hybrid template, and installing the MAUI extension.
Explore the Visual Studio setup for a .NET MAUI Blazor Hybrid solution, including the Blazor web app, .NET MAUI Blazor Hybrid app, and Razor class library templates in one solution.
Enable authentication in a .NET MAUI Blazor hybrid by using Microsoft’s Maui Blazor Web Identity Project, downloading or cloning the sample to implement shared Razor files for web and mobile.
Explore how the Maui Authentication State Provider handles login, logout, token validation and refresh with secure storage and a shared identity API.
Inject the rule manager, register a user, and add the admin role after creation using the role manager to check existence, then test and verify in the database.
Create a book model in shared class library with id, title required, description, author, publisher, publication date, and price as currency decimal(18,2); enable nulls for database use by both apps.
Configure a connection string for authentication and bookstore contexts, create migration, update database to add book table, and move razor files to shared razor component library for web and mobile.
Extend the existing authentication API in the Blazor web app to support a new book object. Learn secure mobile data access via an API rather than direct database calls.
Review Razor files and refactor to remove db factory and Entity Framework calls before adding to the shared library, moving data access to an API instead of direct database access.
Update razor files to move get, add, update, and delete operations into the book service, use token-authenticated api calls, and replace dbcontext with a book list, title filter, and pagination.
Test book creation end-to-end by adding a book service, compiling, and running the web and mobile apps; verify login, create a test book, and confirm data in the database.
Update the android sdk, create an emulator, run maui blazor web on android, debug the book service error with browser inspect, add the book service reference in Maui Programs.
Create a route builder extension in the web app to expose the book API endpoints (pull all, add, update, delete) and test by rebuilding and running the apps.
This course will cover .NET MAUI Blazor Hybrid App and Blazor Web App with authentication. It will review the current out of the box templates provided by Microsoft. As well as a sample project created by Microsoft for shared authentication between the two applications.
The course will build off of this sample project and extend it to add user roles with authorization filtering on a razor page and a shared database object with razor pages that is accessed by both the MAUI Blazor Hybrid app and the Blazor Web app. It will show how an API is built and called between the two applications. It will cover troubleshooting issues that may arise when working on the applications.
The goal of this course is to make a working prototype that will be useful for everyday situations. It will provide a working MAUI Blazor Hybrid app that can be deployed on the different mobile device platforms and Blazor Web app to be deployed for web browser use. The benefit of this prototype will allow the creator to share common pages and data models between both application types without having to duplicate coding. Which will give the same look, feel and functionality to end user.