
Learn to build an ASP.NET Core MVC project, explore controllers, views, models, and a shared layout, configure appsettings and program.cs, and understand routing and middleware in a default home/index setup.
Create actions, views, and controllers in an ASP.NET Core MVC app; build about and details pages and connect them via the home controller and navbar, and add an articles index.
Learn Razor syntax for embedding C# in Razor pages, declaring variables, and rendering values in HTML with Razor expressions; explore sections, HTML blocks, and safe string concatenation.
Learn to render lists in Razor views with for, foreach, and while loops on a string list. Use C# sections and the at character to switch between code and HTML.
Learn to use conditions in Razor views, employing switch and if-else to display messages based on the size of the articles list in an ASP.NET Core MVC app.
Learn Razor directives in ASP.NET Core MVC, including using, inject, model, and sections, and see how to create and use a date service, article model, and appsettings with layout integrations.
Explore how to pass data from a controller to views using model, view data, and view bag, then transfer data between actions with TempData and redirect.
Discover how tag helpers replace hrefs with asp attributes to generate dynamic, parameterized URLs in asp.net core mvc, including route parameters and root patterns from program.cs.
Apply partial views to render articles in an ASP.NET Core MVC app, creating a reusable article partial and including it in the index view with each article model.
Learn to create and apply multiple layouts in an asp.net core mvc app, define an admin layout in the shared folder, and connect it to a dashboard controller and views.
Create a simple contact form in an ASP.NET Core MVC app by building a contact controller and index view, using bootstrap, posting data, validating fields, and displaying submitted data.
Explore data binding and form validation in ASP.NET Core MVC by creating a contact DTO, applying validation attributes, binding with asp-for, and using ModelState.IsValid to display errors or success.
Learn to perform full create, read, update, and delete operations on products with SQL Server and Entity Framework, including filtering, searching, and pagination from the home page and store page.
Create an ASP.NET Core MVC web app named Best Store MVC and connect it to a SQL Server database named Best store DB, then copy the connection string into appsettings.json.
Connect the app to a database with Entity Framework Core, install SQL Server and EF Core tools via NuGet, and enable migrations to update the database in dotnet seven.
Create and register the application db context to connect to the database with entity framework core, configuring it in the service container using the default connection string from appsettings.json.
Create a product domain model in the models folder with id, name (empty string), brand, category, price, description, image file name, date, enabling CRUD operations using max length and precision.
Create and fill the products table by adding a DbSet for the product model, run the first migration, update the database, and insert 30 seed products with images.
Create a products controller to perform CRUD on products, read the list from the database via application db context, and pass it to the index view to render a table.
Create a new product dto model in the models folder, excluding product id, with name, brand, category, price, description, and image file, applying required validations and optional image on updates.
Build the create product flow in an ASP.NET MVC app by adding a create action and view with a multipart form bound to a product DTO.
Create products via an http post action, validate the product DTO, and save the image to public/products and the product to the database.
Create an edit action in the products controller that loads the product by id, maps it to a DTO, and renders a bound edit form with the current image.
Edit product details via a new post action in the products controller, validate input, update or replace images, and save changes to the database.
Implement a delete action in the products controller to fetch by id, delete the product image and database record, save changes, and redirect; add an optional JavaScript confirm prompt.
Implement pagination in the ASP.NET Core MVC app with a five-item page size. Compute total pages, use skip and take, and render Bootstrap page buttons with a current-page highlight.
Add a search field and button using bootstrap, pass the search parameter to the server, retain it in pagination, and filter products by name or brand in the index action.
implement sortable product tables in an ASP.NET Core MVC e-commerce app using a JavaScript sort function and query parameters for column, order by, and search to preserve state.
Sort products in an ASP.NET Core MVC e-commerce app by color name, name, brand, category, price, and created date, with ascending and descending orders.
Add an arrow indicator to the products table using a get arrow function that shows up or down arrows for the current sort column and order.
Explore configuring routes in ASP.NET Core MVC by using route attributes to add an admin prefix, leveraging tag helpers for URLs, and setting default actions and id as path variables.
Add an admin dropdown to the navbar to access product Crud operations, using bootstrap dropdown code in the shared layout. Replace container fluid with container to improve spacing and visibility.
Update the home page by changing the application name to Best Store, add a window and navbar image from public/images, adjust the shared layout and footer, then test the application.
Update the home page to display a hero section in a two-column bootstrap layout. Include the best store of electronics heading, add the image, and adjust margins for full-width hero.
Create a newest products section on the home page by retrieving the four newest products via the db context and displaying them in a responsive Bootstrap grid.
Create a store controller for clients to view products by reading from the application db context. List them in index sorted by newest first and expose via the view bag.
Implement pagination in the store controller by fixing a page size of eight, validating the page index, and using query operations (order by, count, skip, take) to render bootstrap pagination.
Configure a store search bar in the index view with brand, category, sort, and search fields, using model binding and parameters preserved during pagination.
Display product details in an ASP.NET Core MVC app by wiring the details button to the store controller, retrieving the product by id, and showing image, name, price, and description.
Master user registration, authentication, and role-based authorization with the identity framework, manage profiles and passwords, handle password reset via email, and administer users with roles, pagination, and deletion.
Install the identity package to enable user authentication and authorization using identity framework. Manage NuGet packages, browse identity.entityframeworkcore, select a dotnet seven compatible version, and install.
Extend the application dbcontext to identity dbcontext, create application user with first name, last name, address, and createdat, then add migrations to create roles and users tables and update database.
Add identity services to the service container in program.cs using AddIdentity with user and role models. Configure password options to min length six and disable non-alphanumeric, uppercase, and lowercase requirements.
Seed identity data by creating admin, seller, and client roles and a default admin user, via the user and role managers at startup.
Implement user registration by creating a register dto model bound to form, including first name, last name, email, address, phone, password, and confirm password, with required, length, and format validations.
Create a register form in an ASP.NET Core MVC app by wiring an account controller with user manager and sign-in manager, binding a register model to a post method.
Create a register post handler that validates model state, builds an application user from submitted data, creates the account with user manager, assigns the client role, signs in, and redirects home.
Update the navbar to show a user dropdown with name and role when authenticated, for admin and client roles, with a logout option; non authenticated users see login and register.
Implement a logout action in an ASP.NET Core MVC app that checks authentication via claims principal, signs out asynchronously with SignInManager, and redirects to the home page.
Define a login dto with email, password, and remember me; create a login action and login view to render a post login form with Bootstrap and a forgot password link.
Add a profile page and protect it with the authorize attribute. Apply role-based authorization to the products controller with the admin role and redirect unauthorized users to home page.
Display the authenticated user profile by retrieving the application user with the identity user manager and showing first name, last name, email, phone, address, and role via a bootstrap modal.
Learn to build an update profile form bound to a profile dto, prefill with current user data, validate input, and save changes via a post action in the account controller.
Update user password by implementing a post action in the account controller with a Password2 dto for current, new, and confirmed passwords, validating input and updating via the user manager.
Implement a forgot password workflow in ASP.NET Core MVC by validating user email, generating a password reset token, creating a reset link, and sending it via email.
Learn to send transactional emails with Bravo by configuring the API key in appsettings.json, installing the NuGet package, and wiring a C# email center to send password reset messages.
Learn to implement forgot password flow in ASP.NET Core MVC by generating a reset token, sending a reset link via email, and validating user input to securely reset the password.
Develop an admin-only page in ASP.NET Core MVC that lists registered users ordered by creation date, displays user details, and shows roles as colored Bootstrap badges.
Learn to add pagination for registered users by using a page index and page size, calculating total pages, applying skip and take, and rendering bootstrap pagination with view bag.
Shows how to implement a details action in ASP.NET Core MVC to display a user by id, with null checks, role retrieval, and a details view.
Learn how to update a user role in an ASP.NET Core MVC app using a bootstrap modal, a dynamic select list, and TempData messages for success or error feedback.
Demonstrate deleting a user account in ASP.NET Core MVC by presenting a bootstrap confirmation modal, validating the id, preventing self-deletion, and invoking the user manager to delete.
Learn how to add products to the shopping cart, adjust quantities, and create orders with login, delivery address, checkout, and viewing order details as administrator.
Create and configure orders and order items models with foreign keys to the client and product to store order details, items, unit prices for history, and status in database.
Store the shopping cart in a browser cookie, compare cookies, session, and database storage, and encode the cart as base64 json to fit the 4 kilobyte limit.
Add a shopping cart icon to the navbar in an ASP.NET Core MVC e-commerce app. Update the layout with a Bootstrap cart icon and a badge.
Implement JavaScript functions to add products to a shopping cart stored in cookies, read and encode cart data with base64, and update the navbar cart count.
Read the server-side shopping cart cookie and display the cart size by implementing a cart helper that decodes a base64 encoded JSON dictionary of item ids and quantities.
Build a shopping cart display in ASP.NET Core MVC by wiring the cart controller, loading shipping fee from appsettings.json, reading the cart cookie, and rendering items with subtotal and total.
display the shopping cart summary with subtotal, shipping fee, and total, then create a checkout form for delivery address and payment method, handling authentication and order submission.
Create the cart confirm flow in ASP.NET Core MVC: compute total with shipping, validate address and payment, persist an order with items, and show a confirmation view and success message.
Implement JavaScript to read and write the shopping cart cookie and to increase, decrease, and delete items. Bind these actions to plus, minus, and delete controls to refresh the page.
Create an admin orders controller secured to the admin role via the admin route. Read orders with client and items, order by id, and render bootstrap table in index view.
Implement pagination for admin orders in an ASP.NET Core MVC app by setting a five-item page size, calculating total pages, skipping to chosen page, and rendering bootstrap pagination controls.
Learn how the admin orders details action in ASP.NET Core MVC retrieves an order by ID, includes client and item details, displays product info, and computes totals.
Update payment and order statuses in an ASP.NET Core MVC admin orders workflow using models and an edit action, with status options and redirects to order details.
Create an ASP.NET Core MVC client orders controller restricted to the client role, fetch the current user via user manager, and filter orders by client id for the index view in nav.
Create a client orders details action in the client orders controller that reads current user, ensures order ownership by id, and renders a details view showing items and order summary.
Build PayPal payments in an ASP.NET app by configuring a PayPal developer account, obtaining access tokens, and implementing create order and complete order flows.
Link the cart to the checkout to route PayPal, credit card, and cash on delivery flows. Show an order summary with shipping fees and the delivery address.
This course is for Beginners to ASP.NET having some knowledge of C# or similar programming languages.
In this course, I will show you how to create a web application using ASP.NET Core MVC. You will understand the MVC pattern and you will be able to create Models, Views and Controllers.
We will use Entity Framework to perform CRUD (Create, Read, Update and Delete) operations and to implement advanced functionalities, such as pagination, search and sort.
We will use Identity to implement user Registration, Authentication and Role-based Authorization. Besides, we will add many useful functionalities, such as edit the user profile, update the user password, display the registred users, update the user role, delete the user account, and request a password reset token.
Also, we will create the shopping cart and orders. We will store the shopping cart into a cookie and we will use colored badges to track the order status.
In this course, you will learn:
- The architecture of ASP.NET Core MVC
- How to create Models, Views and Controllers
- How to pass data from the controller to the view
- How to create forms and bind models to the forms
- How to validate form data using attributes and model binding
- How to install and use Entity Framework to access SQL Server Databases
- How to perform CRUD operations (Create, Read, Update and Delete) using Entity Framework
- How to advanced functionalities: pagination, search and sort
- How to upload images to the server
- How to read application parameters from appsettings.json
- How to use dependency injection: add services to the application container and request services from this container
- How to install Identity and how to create Identity user and tables
- How to create user Roles and how to register the Admin user
- How to register, authenticate and authorize users
- How to edit the user profile and password
- How to request password reset token by email
- How to display the registered users
- How to edit the user role
- How to delete the user account
- How to create, read, update and delete the shopping cart
- How to create orders and how to update the order status
To follow this course, you need to install the following tools
- Visual Studio 2022 including two components: “ASP.NET and web Development” and “.NET Desktop development”
- Microsoft SQL Server