
Master ASP.NET Core 3.1 Razor Pages and its routing and action results while building an auto shop app with employees, customers, vehicles, service history, and email and social features.
Explore the final ASP.NET Core 3.1 Razor Pages project live on Azure, with login options, restricted admin features, and guided views of users, service types, cars, and service history.
Trace the evolution of ASP.NET from classic ASP and Web Forms to MVC and ASP.NET Core, highlighting separation of concerns, testability, and cloud readiness.
Explore building a Razor Pages book list app with data tables, create, edit, delete operations, and validations, then compare with an MVC project and advanced final project.
Explore the Spark Demo project in master ASP.NET Core 3.1 Razor Pages, featuring admin and customer roles, user management, car services, a shopping cart, and service history.
Access a centralized resource hub for this project, linking code samples, GitHub comments, downloadable content, presentations, and additional documents all from one place.
Install Visual Studio 2019 Community Edition, .NET Core 3.1, SQL Server 2019, and SQL Server Management Studio—the four free tools you need to build ASP.NET Core 3.1 Razor Pages projects.
Explore the fundamentals of ASP.NET Core, create a project, and review the files and structure while covering security topics like SQL injection, cross-site scripting, open redirect attacks, and dependency injection.
Open the csproj file to understand project configuration, target framework Natcore app 3.0, and how NuGet package references are added or moved, including the metal package and Entity Framework changes.
Explore launchSettings.json to manage project launch profiles, environment variables, and server options for IIS Express and Kestrel, including dev versus production behavior and SSL configurations.
Explore appsettings.json in an ASP.NET Core 3.1 Razor Pages project, storing logging, connection strings, and security keys. Access these settings via dependency injection in startup, with options for remote storage.
Explore the wwwroot folder, the root for static files like images and JavaScript, and see how a clean separation from code in an MVC Razor Pages app keeps assets organized.
Discover Razor Pages in ASP.NET Core 3.1, a page-focused approach that keeps ui and page models closer to view, with routing, on get and on post handlers, and tag helpers.
Explore the pages folder in Razor Pages, including the shared folder, partials like _layout and validation scripts, tag helpers, and the page model for index and privacy pages.
Learn how Razor Pages routes requests to physical files in the pages root, with the default index and extensions omitted to resolve pages.
Explore tag helpers in ASP.NET Core 3.1 Razor Pages, enabling server-side rendering of HTML elements and comparing them to Angular directives, with examples on labels, forms, and navigation.
Explore action results as the abstract base for action methods in razor pages and mvc, with derived classes and helpers that return pages, views, files, not found, or redirects.
Explore how the main method serves as the entry point, how create host builder starts the app, and how the startup class configures services and the request pipeline.
Explore how the runtime configures the startup class, registers services via configure services, and builds the HTTP request pipeline with middleware like MVC, authentication, and static files, including Razor Pages.
Explore how an ASP.NET Core 3.1 Razor Pages app handles a browser request through IIS and Kestrel, configures middleware in startup, and routes via endpoint routing.
Discover how a request flows through a middleware pipeline from first to last, using a context object to produce a response, with authentication middleware able to return an unauthorized response.
Explain how sql injection exploits input to alter queries, potentially exposing or destroying database data, and show how parameterized queries prevent it.
Cross-site scripting lets attackers inject JavaScript into trusted pages, steal cookies, and impersonate users on a car listing site. Encode untrusted output and validate input to prevent it.
Explore open redirect attacks in web apps, where malicious links redirect users and expose credentials. Protect with local redirect and use is local to keep redirects internal.
Understand how cross site request forgery exploits authenticated cookies to trigger actions, and how ASP.NET Core Razor Pages prevents it by using an anti forgery token with form tag helpers.
Discover how dependency injection uses a IOC container to manage object creation and lifetime, inject dependencies at runtime, and decouple services with Esprit de corps built-in support.
Explore your first booklist project by learning how to connect to a database and perform create, read, update, and delete operations in an ASP.NET Core 3.1 Razor Pages setup.
Install the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package to enable automatic runtime compilation of Razor views, then modify startup ConfigureServices to enable it, so changes appear without restarting.
Create a book model by adding a book class with integer id as a key and identity, a required name with display attributes, and an author property for the database.
Install essential entity framework core and SQL Server packages, configure a connection string to a localdb, create the Booklist Razr database, and prepare startup for migrations.
Set up entity framework in ASP.NET Core 3.1 Razor Pages by adding the application db context and configuring startup; migrate to create the book table with id, name, Orta.
Configure a Razor Pages get handler to fetch all books via the application db context using dependency injection and display them in the index view.
Design the book index page in an ASP.NET Core 3.1 Razor Pages app, update _Layout with a book tab routed to Booklist/Index, and display all books in a Bootstrap table.
Continue designing the book index page by rendering books from the page model's enumerable, using tag helpers and a Bootstrap table with create, edit, and delete links.
Create a Razor Pages create page with text boxes for the author and book name, saving to the db context. Add ISBN and migrate to update the new column.
Design a Razor page UI to create a book with Bootstrap styling and tag helpers, including inputs for name, author, and ISBN, with a post handler to save to database.
Learn to implement create form validations in Razor Pages by binding a book object, using an on post handler, checking model state, and displaying validation messages to enforce required fields.
Discover client-side validations in ASP.NET Core 3.1 Razor Pages by including the validation scripts partial via the tag helper and ensuring both client and server side validation during create.
Create an edit razor page in ASP.NET Core 3.1 Razor Pages by passing the book ID with asp-route-id, loading the book with FindAsync, and preparing the edit view.
Edit book UI demonstrates loading existing book data, replacing fields, and submitting updates via a post handler with the route ID in ASP.NET Core Razor Pages.
Update a post via a post handler in Razor Pages by validating model state, retrieving the book, updating fields, saving changes, and redirecting to the index with a hidden id.
Enable delete book on index page with a confirmation alert and a post delete handler in Razor Pages, using a custom tag helper and save changes to remove the book.
Add a book api with get and delete endpoints via an api controller, using the application db context, mapped to /api/book for data tables, with sweet alert and toasters.
This lecture demonstrates building a DataTables grid in a Razor Pages app, loading book data via Ajax from /api/book, defining columns, and rendering edit and delete buttons.
Implement a delete API call in the book controller using Entity Framework, returning JSON with success and message, and add a client-side JavaScript delete function.
Learn to implement a delete function for books using ajax calls to an API, confirm with a sweet alert, and display toaster notifications with success or error handling.
Combine create and edit into a single upsert razor page in ASP.NET Core 3.1, using a nullable id to distinguish create from update and implementing get and post handlers.
Enable an upsert page interface by using razor syntax to switch between create and edit based on model.Id, hide the id for create, and update the button text accordingly.
Learn how to leave a rating and write a review for this asp.net core razor pages course, including edits to your rating, and how feedback helps improve content.
Begin the second project in the master asp.net core 3.1 razor pages course, create a new project, review added files, and design the header and footer.
Create a new ASP.NET Core 3.1 Razor Pages project named Spark Auto, enable individual user accounts, and add Razor runtime compilation for ongoing development.
Master ASP.NET Core 3.1 Razor Pages by examining the startup file and its differences from older versions, including default identity configuration, endpoint routing, and simplified MVC usage.
Learn to customize the shared underscored layout in Razor Pages by toggling development versus production assets, enabling environment-based bootstrap and JavaScript, and utilizing cookie consent partial views within the navigation.
Explore how enabling identity creates a new data folder, areas with identity and pictures, and a pre-built application db context with default identity tables and migrations.
Explore new files and folders, view default identity tables, and review login and register patterns. Scaffold identity pages, customize identity setup, and align layout with the application db context.
Design header and footer by updating the master layout to a dark navigation bar. Adjust login and register links, text colors, and padding to align the landing page.
Learn to manage service types in a Razor Pages app by letting admins create, view, edit, and delete services with prices from the service type tab on the index page.
Create the first model, service type, with name, price, and an id; register in the db context; add a migration; update the database to create the table.
Add a service types index page in the Razor Pages app, configure the underscore layout, and expose the list of service types to the admin user.
Retrieve all service types in on get handler, display them on index page, and show a 'no service type exist so far' message if none are found using dependency injection.
Add the images to the static files images folder, then apply a white background over a grayish color with 30px padding and a 10px border radius in css for layout.
Designs the index page with a two-column bootstrap layout, listing service types on the left and a create button on the right, using Font Awesome icons.
Retrieve all service types via the get handler and display them in a bootstrap table on Razor page. Show a no service type exists message when the count is zero.
Build a create Razor Page with get and post handlers in ASP.NET Core 3.1, using a form for name and price and a page model.
Implement the on post handler to create a service type in a Razor Pages app, validate input with server- and client-side checks, and save to the database.
Add edit, details, and delete buttons to the index page using Razor anchor tags with Font Awesome icons, and create a shared partial view for reuse across Razor pages.
Create an edit Razor page for service types using entity framework, with on get fetching by id and on post updating via entity state modified.
Update the edit Razor Page UI by reusing the create form, add a hidden service type id, and use a partial view for edit to validate and update the price.
Create a details page for a service type, fetch it by id from the index, and display its name and price with buttons to the editorial and index pages.
Create a Razor page to delete a service type, display details in a disabled form, and process a post request to remove the record from the database; GitHub solution available.
Enhance the registration page by adding properties and roles, introducing admin and customer roles, and registering a new customer within the ASP.NET Core Razor Pages project.
Compare asp.net core 3.1 and 2.0 differences in the register page, including dependency injection and the input model with email and password, plus external logins and email verification tokens.
Extend the ASP.NET Core Identity user by adding name, address, city, postal code, and phone number; implement ApplicationUser, update the db context, run migrations, and update the register page.
Update the register Razor page to add name, address, city, postal code, and a required phone number in the input model, with validation and Bootstrap-based layout.
Explore adding roles in asp.net core 3.1 razor pages by defining admin and customer constants in a static class, then assign admin to the first registered user in post handler.
Resolve the email sender error in ASP.NET Core Razor Pages by commenting out the email sender usage to fix the 'unable to resolve service type' issue during identity account registration.
Add roles with dependency injection, configure identity roles via role manager and the app db context, create admin and customer roles, and assign the admin role to a new user.
Implement new user registration with role assignment, ensure new users register as customers, fix logout redirect, and verify roles in the database.
Master ASP.NET Core 3.1 Razor Pages by building an admin user list with search by name, email, and phone, plus pagination and a custom tag helper for car selection.
Add a users tab and index page in ASP.NET Core Razor Pages to display all users using Entity Framework Core, including related data, via an async get handler.
Create a users index UI in Razor Pages with a heading, a create button, a table of users including edit and delete actions, and navigation to the identity register page.
Create a paging info class for pagination in ASP.NET Core Razor Pages, including total items, items per page, current page, total page, and you are param via custom tag helper.
Learn to build a custom Razor Pages tag helper from scratch, structuring a paging helper with a div target, view context, and page classes for pagination in ASP.NET Core 3.1.
Build a custom tag helper for pagination in ASP.NET Core 3.1 by creating tag output with tag builders, looping pages 1 to total, and applying normal and selected styles.
Implement a tag helper for pagination in ASP.NET Core Razor Pages by creating a view model that combines the user list with paging info and applying skip and take logic.
Consume the updated model on the index page, wire a user list view model, and integrate a page link tag helper to drive pagination.
Implement search criteria on the users index page in Razor Pages to filter by email, name, and phone using a get form submission on the same page, preserving pagination.
Implement a user search on the users page model by collecting email, name, and phone criteria and asynchronously filter the user list with paging.
Display all editable user properties on the added users page with the get handler. Pass the user id, keep email disabled, and expose a header for the post handler.
Create the user delete page in razor pages with no form; files are disabled and the post handler removes the user from the database.
Explore authorization and access control in ASP.NET Core Razor Pages, including admin email verification, and implement social login options with Facebook and Google.
Authorize admin-only access to service type and user pages by applying authorization to Razor Pages, and configure ASP.NET Core Identity with default UI to enforce authentication and role-based authorization.
Continue implementing authorization by assigning new users a customer and user role, adding an is admin checkbox for admins, and hiding service type and user tabs from non-admins.
Add an isAdmin field to the register page model and display a conditional admin checkbox for creating new admin users, visible only to logged-in admins.
Register an admin user by assigning roles based on the admin flag, redirecting to the users index, and sending a confirmation email for admins while allowing customers without email verification.
Configure email sending in ASP.NET Core Razor Pages by storing a Sanscrit API key in appsettings.json and wiring an EmailOptions and EmailSender (IEmailSender) with an execute method via dependency injection.
Learn to fix SendGrid issues by confirming your email, enabling sender authentication, and choosing domain or single sender verification for successful verification.
Implement the IEmailSender interface and integrate SendGrid to send emails in an ASP.NET Core Razor Pages app, configuring dependency injection, app settings, and email options.
Uncomment the email sender code on the register page under Areas Identity Account to enable upcoming email sender implementation.
finalizes the email send flow by creating users, confirming emails, and enforcing login checks that redirect unconfirmed admins to a verify email page.
Create a verify email page that retrieves the email as a string, displays it, and adds a resend option with a new confirmation token for admin registration.
Learn how to add Facebook login to an ASP.NET Core 3.1 Razor Pages project by installing the Facebook authentication NuGet package via the package manager.
Enable Facebook login and Google sign-in in an ASP.NET Core 3.1 Razor Pages app by configuring authentication, adding Facebook in startup, and handling redirect URLs.
Modify the external login razor page to mirror the register page, inject role manager and db context, and remove password fields from the input model for Facebook authentication.
Enhance the external login Razor page layout and styling, auto-populate the user name from the provider, and create a new application user with customer and user roles after Facebook login.
Explore managing car records in an ASP.NET Core Razor Pages app by viewing a list of users' cars, opening the view car page, and performing add, edit, and delete operations.
Define a car model with id, win number, make, model, year, miles, color, and a foreign key user id referencing application user, and create a migration to add it.
Design and implement a car and customer view model in Razor Pages, build a cars index page, pass user IDs, display customer details and car images, and style the interface.
Implement the car index get handler in a Razor Pages app, retrieving a user's cars via claims identity and a car and customer view model.
Design a car index Razor page with Bootstrap cards, a dark header, and a car icon, offering admin links to user lists and create actions that pass the user id.
Build the car index Razor page UI by aligning user details in a Bootstrap grid, displaying name, phone, and email, and listing cars with edit, delete, and create options.
Create a new car in a Razor Pages page by reusing the service type pattern, wiring user id via claims, and initializing the car to prevent null reference errors.
Create a car via a post handler, redirect to the index with the user id, and show a temp data status message using a shared partial.
Display all car properties and allow admin or user edits on a Razor Pages page, reinforcing code reuse from previous assignments; refer to the GitHub solution for reference.
Create a delete Razor page for car with properties disabled and perform deletion via the post action button, mirroring the service type delete pattern; see GitHub for the solution.
Explore the garage service workflow—manage customers and cars, add and remove services, enter miles (5000), complete the service, and view service history.
Develop a shopping cart view model for ASP.NET Core Razor Pages, modeling a service cart with car and service type, and storing service summaries for quotes and transactions.
Create service header and service details models to log car servicing, capturing miles and total price with date added, car reference, and service type, name, and price.
Create a car service view model in ASP.NET Core 3.1 Razor Pages by modeling car, service header, service details, service type list, and shopping cart, then update database with migrations.
Add admin-only service actions to the cars index in asp.net core razor pages by introducing history and new service buttons, passing the car ID, and styling with a wrench icon.
Create the service get handler for Razor Pages, retrieving the target car, user details, and available service types, while loading the shopping cart and computing the total price for display.
Create service Razor page part 1 implements a Bootstrap card layout for a new service, using a container, grid, back navigation via sb route with a user id.
This lecture guides building a Razor Pages interface that splits the page into user details and car service sections, using hidden fields, a service type dropdown, and an add-to-cart form.
Display a two-column shopping cart: left seven-column table of service types and right five-column text box area for minds and comment, showing price and a delete button.
Implement add to cart and remove from cart post handlers in asp.net core razor pages app, creating and persisting a service shopping cart with car id and service type id.
Learn to enhance the research page by displaying the total service price, miles, and details, style with a green text-success, and wire a submit button with input validation.
Learn to integrate sweet alert in asp.net core razor pages by adding the cdn, wiring a validate input function, and showing an error when miles are zero or empty.
Create a post handler that builds a service header from shopping cart, adds service details for each item, computes the total price, saves changes, and redirects to cars page.
List all service headers for a car on the service history page using the application db context, including car and application user via ef core.
Build a service history razor page in asp.net core 3.1, fetching user IDs and service headers to display records in a table with details links.
Create a service details page in the Benmore app using a get handler to fetch a service header and its details, with entity framework core.
Design the service details Razor Page by mirroring the create page, display service header with name, type, and price, show total price and miles, and set fields to read-only.
Identify and fix a data inconsistency in the car service application by tracing added services and pricing in the admin panel, ensuring accurate history for Honda CR-V and Toyota Corolla.
Identify and fix the create for service bug by adding a where clause to filter the shopping cart by car id, then verify pricing and service history as admin.
This is a complete course on ASP.NET Core 3.1 using Razor Pages that will take you from basics all the way to advance mode. This course is for anyone who is new to ASP.NET Core 3.1 or who is familiar with ASP.NET MVC and wants to take the first stab at understanding what is different in asp.net core 3.1. From there we would be building multiple projects to understand all concepts in ASP.NET Core 3.1
Are you interested in learning the latest framework Microsoft has introduced? Not just that long with that also use the most recent introduction to their stack? If so then this is the correct course!
ASP.NET Core and then we would take a look at the modified files and folder structure.
We would build a CRUD Operations application with EF and use Razor Pages for the first project
Finally, we would build an Auto Shop website where admin can enter service records for their customers and customers can view all the service history.
What am I going to get from this course?
Learn the structure of ASP NET Core 3.1 Project
Learn basic security of ASP NET Core 3.1
Build applications using ASP NET Core 3.1 using Razor Pages
Integrate Identity Framework and learn how to add more fields to Users
Integrate Entity Framework along with code first migrations
Authentication and Authorization in ASP.NET Core 3.1
Sessions in ASP.NET Core 3.1
Data Seeding and deployment to Azure
What is the target audience?
Anyone who wants to learn asp.net core 3.1 Razor Pages
Anyone who wants to learn the latest changes with Microsoft newest framework