
Build a restaurant web app with ASP.NET Core Razor Pages on Azure, featuring a browsable menu, shopping cart, Stripe checkout, and admin tools for items, roles, and orders.
Explore the tools needed for this course, including dotnet six, Visual Studio 2022, and SQL Server Management Studio for the database.
Find all project resources at dotnet mastery, including a live site preview, sectioned GitHub updates, and downloadable course content with snippets, PowerPoint files, and attachments.
Trace the evolution of dotnet core, from web forms and mvc to a cross-platform, cloud-friendly, fast, open-source framework with built-in dependency injection and smooth upgrades.
Discover how dependency injection in ASP.NET Core uses the built-in IOC container to inject services via constructors, reducing duplication and simplifying maintenance across pages.
Open the project file in the asp.net core razor pages course to view the property group setting dotnet six and the item group for nuget packages, including razor runtime compilation.
Explain how IActionResult acts as a parent type for many derived classes in MVC and Razor pages, enabling flexible returns like view, page, and redirects.
Explore how data annotations configure primary keys, identity columns, and required fields in Entity Framework Core, and set up a SQL Server connection string with EF Core packages.
Add a connection string in appsettings.json under connectionStrings, using the dot as server name for the AP database and trusted; then configure the db context and EF Core.
Install entity framework core and sql server packages, then create an application dbcontext and a category dbset. Configure the connection string in appsettings.json to connect to your database.
Configure the application to use a SQL Server DbContext by registering it as a service in program.cs, retrieving the default connection string from appsettings.json and wiring it through dependency injection.
Display all categories on the Razor page by looping model.categories in index.cshtml. Present them in a Bootstrap-styled table with name and display order, using Razor runtime compilation.
Apply Bootswatch themes to customize Bootstrap styling, update the CSS and layout, and enable dark navigation and icons. Add input validations to prevent null values and avoid exceptions.
Learn server-side validations in asp.net core razor pages by validating category model on create using model state and is valid, and show errors via asp-validation-for for name and display order.
Implement server-side custom validations in ASP.NET Core Razor Pages by comparing category name and display order, adding a model error with ModelState.AddModelError, and displaying a validation summary.
Learn how to customize field names with the display attribute and enforce value ranges with the range data annotation in Razor Pages, including custom error messages for display order.
Learn to enable client side validations in ASP.NET Core Razor Pages using a shared validation script partial, a scripts section, and partial tag helper to bind errors to a property.
Implement delete category functionality in asp.net core razor pages by locating the category by id, removing it from the database, saving changes, and redirecting to index with disabled fields.
Move alert code into a partial view to avoid duplicating code, call it from pages, and optionally render it in the shared layout for consistency across all pages.
Divide your ASP.NET Core Razor Pages solution into data access, models, and utilities by creating three class library projects, moving data, and updating to .NET 6 RC1.
Fixing IIS Express errors by correcting using statements and references in an n-tier architecture, creating a fresh database via EF Core migrations, and updating packages to .NET 6.
Organize admin and customer pages by creating folders, moving categories into admin, and updating namespaces in page models and views; restart Visual Studio to refresh navigation and test a category.
Create and integrate a food type model in an ASP.NET Core Razor Pages app, add a DbSet, remove display order, run migrations, and implement CRUD across food type pages.
Implement a unit of work that implements IDisposable to wrap all repositories, exposing a category repository and a save method, using a DbContext with dependency injection.
Create the food type repository interface and implementation, configure it in the unit of work, and update pages to use the unit of work instead of the application db context.
Create a menu item table by adding a migration, configuring a db set in the app db context, and pushing changes with foreign key constraints and indices.
Configure the menu item repository and update the unit of work to include the new menu item, aligning updates to only change provided properties and preserving existing image when null.
Integrate a rich text editor using TinyMCE in an ASP.NET Razor Pages app, wiring in the script, API key, and a textarea with validation for create and upsert flows.
Learn to implement a menu item post handler: upload an image to wwwroot/images/menu items, generate a unique file name, and persist the item with unit of work save.
Add an api endpoint in the Razor project to fetch all menu items as json via a controller, and display category and food type names on the index page.
Use include to load category and food type in EF Core. Extend the repository to accept comma-separated include properties and display results in a data table.
Render edit and delete buttons in a data table using the menu item ID to navigate to the admin menu items absurd page for editing, with Bootstrap styles and icons.
Learn how the menu item edit get handler loads item details from the database, populates dropdowns, and switches the form to update mode with image display for existing items.
Implement the update flow for a menu item in asp.net core razor pages, including fetch, optional image replacement with old image deletion, and saving changes.
Display all menu items on the home page with a bootstrap card layout and a get handler. Use dependency injection and a unit of work to fetch items and categories.
Display home page renders categories and their menu items by looping through category list and filtering menu items with a where clause. It shows price, image, and HTML raw descriptions.
Extend the repository with include properties, nullable includes, and a shared filter for get all and get first or default, plus a configurable order by.
Navigate to the details page using the item id, load the menu item via the unit of work, and display category, food type, price, bound count, and client-side validation.
Scaffold identity into an existing dotnet core web project, override the identity files, and connect to the application db context, ensuring all nuget package versions align.
Extend the registration flow to create an application user with first name, last name, and phone number, replacing identity user and updating the input model.
Configure and seed multiple roles in ASP.NET Core Razor Pages by defining role constants, creating roles with the role manager, and assigning selected roles to new users during registration.
Bind a shopping cart object on the details page with the menu item, count, and user ID, and create a cart entry when the add to cart button is pressed.
Explore how authorization restricts access in ASP.NET Core Razor Pages using the authorize attribute at the page model level and configure custom login, logout, and access denied paths.
Implement add to cart on ASP.NET Core Razor Pages by capturing menu item id, user id from claims, and quantity, validating model state, and saving to the shopping cart.
Increment the shopping cart count for an existing item instead of creating duplicates. Implement repository methods to increment and decrement counts, with unit of work handling updates.
Learn to implement a shopping cart in asp.net core razor pages, display items with image, name, category, price, and quantity, and fix data population for authorized users.
Implement three post handlers (plus, minus, remove) for the shopping cart using asp-page-handler tag helper and a cart ID; fetch the cart, adjust the count, and redirect to index page.
Create the order header model with id, user id, date, total, pickup time, and status. Add data annotations for validation and currency formatting, and map dates for ef core.
Create the order details model with an order header id as a foreign key, a navigation property, and include required menu item id, count, and price to preserve price.
Implement order header and order details storage by adding corresponding database tables, configuring repository and unit of work for both headers and details, and implementing a generic update method.
Implement order header and order detail repositories in ASP.NET Core Razor Pages, configure the db context with migrations, and set up unit of work to manage header and detail updates.
Build and refine the order summary UI in ASP.NET Core Razor Pages by binding inputs with tag helpers and looping through cart items to display totals.
Repository Pattern? Yep.
N-Tier Architecture? Covered!
Credit Card Payments? You got it!
Data-Seeding and Deployment to Azure? It's here!
If you're looking to learn Repository Pattern, N-Tier architecture in record time with ASP.NET Core (.NET 6) you're in the right place! You'll find absolutely no filler content here, only direct, accurate, and concise explanations of exactly how to build professional ASP.NET Core applications.
This is an Intermediate to Advance level course on ASP.NET Core (.NET 6) that will take you from basics all the way to advance mode. This course is for anyone who is familiar with ASP.NET Core basics and wants to know how to architect and code real-world applications in ASP.NET Core.
What are the requirements?
Basic knowledge of ASP.NET Core Razor Pages
6 months knowledge of c#
Visual Studio 2022
SQL Server Management Studio
What am I going to get from this course?
Learn the structure of ASP NET Core (.NET 6) Project
Learn basic security of ASP NET Core (.NET 6)
Build applications using ASP NET Core (.NET 6) using Razor Pages
Repository Pattern
N-Tier Architecture
Stripe Payments and Refunds
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 (.NET 6)
Sessions in ASP.NET Core (.NET 6)
Data Seeding and deployment to Azure
What is the target audience?
Anyone who wants to learn asp.net core (.NET 6)
Anyone who wants to learn latest changes with Microsoft newest framework