Course on ASP.NET Core 5 MVC Razor Pages with Project

This is a $20 step by step video course for learning ASP.NET Core. Learn from the comfort of your home. Each topic is explained in a beginner's language. See the table of contents below for a clear roadmap.

Categories | About |     |  

Parveen,

Following are the details of this course:

FREQUENTLY ASKED QUESTIONS

What will I get? Ans: See the TOC below. Downloads of the source code in zipped form are provided for (i) each and every program, (ii) exercise solutions as well as (iii) of each step of the completion of the project.

Prequisites? Ans: Working knowledge of C#, RDBMS concepts, html5, css and working knowledge of javascript.

Versions? Ans: The course applies to .NET Core 5, .NET 6 and later. Visual Studio 2022 and later.

Project? Ans: A project "Find a Doctor" is completed as the course progresses. This project covers all the common scenarios that a web developer has to deal with. Doctors and patients can update their profiles, and patients can search for doctors of various specializations and in various cities. A consultation + payment loop is fully built in this project. Even though the project is "Find a Doctor", but it can be thought of as a "customer-service provider project". Hence, it can be modified for a website where customers search for plumbers, technicians, etc., or for a website where students search for teachers of various subjects.

Pricing? Ans: $20 [PayPal] or INR Rs. 1400 [deposit to account].

Expiry/Validity? Ans: Lifetime validity. Watch as many times.

Free trial? Ans: Write to us to obtain your login ID and password valid for 3 days of unlimited access to the videos. But downloads are not available during the trial period.

Whatsapp Contact? Ans: Send me a whatsapp - 911724608037 OR click here

EMail Contact? Ans: Send me an email - SALES.HOVEN@GMAIL.COM

Chapters covered in this Course

Following is the table of chapters covered in this video course. A project is also completed as we progress along the course.

Ch 1 - Razor Pages
  1. L01 - Introduction to Razor Pages (20 min)
    (watch first 6 mins )
  2. L02 - Middleware Configuration (15 min)
    (watch first 6 mins)
  3. L03 - Integrating CSS, JS and _Layout (16 min)
    (watch first 6 mins )
  4. L04 - Inter Page Navigation and Linking of Razor Pages with Tag Helpers (10 min)
    (watch first 6 mins )
Exercises on Ch1 - Razor Pages
Solutions and discussion of these questions: (C# ASP.NET Core) Practice Exercises and Questions on Razor Pages
Find a Doctor (Project Step 1)

(watch first 6 mins)

This is now an implementation of the concepts learnt so far, where we start with a new project and add three razor pages - Index, Login and Register. Layout and viewstart files use the CSS/JS based bootstrap library to provide "color" to the pages. Tag helpers are used for inter page navigation.

Ch 2 - Basic Event Handling in Razor Pages
  1. L01 - How to handle a click event (14 min)
    (watch first 6 mins )
  2. L02 - Creating an HTML FORM with Razor Pages (15 min)
    (watch first 6 mins )
  3. L03 - How to handle a FORM submit event (10 min)
    (watch first 6 mins )
  4. L04 - How to handle Server Side Validation (14 min)
    (watch first 6 mins )
Exercises on Ch2 - Basic Event Handling in Razor Pages
Solutions and discussion of these questions: (C# ASP.NET Core) Practice Exercises and Questions on Basic Event Handling in Razor Pages
Find a Doctor (Project Step 2)

(watch first 6 mins)

Event handlers for Login and Registration buttons are connected now. Two model classes RegistrationInfo and LoginInfo are added to connect the registration and login forms to the respective OnPostAsync handlers. We verify that FORM data is indeed being received, and server side validation and validation summary are functional. We are now at the point of database connectivity where we shall register the user.

Ch 3 - Database Connectivity - I
  1. L01 - Various Database Options and the initial Setup (13 min)
    (watch first 6 mins )
  2. L02 - Getting Started with Database INSERT of Form data (23 min)
    (watch first 6 mins )
  3. L03 - Strategy to handle a DbUpdateException (9 min)
    (watch first 6 mins )
  4. L04 - Composite Primary Keys and Search by PK (9 min)
    (watch first 6 mins )
  5. L05 - Displaying Data and OnGetAsync (10 min)
    (watch first 6 mins )
  6. L06 - Deleting Records and the Anchor Tag Helper (10 min)
    (watch first 6 mins )
  7. L07 - Updating Records (13 min)
    (watch first 6 mins )
  8. L08 - Checkbox in a Razor Form (13 min)
    (watch first 6 mins )
  9. L09 - Radiobuttonlist in a Razor Form (15 min)
    (watch first 6 mins )
Exercises on Ch3 - Database Connectivity - I
Solutions and discussion of these questions: (C# ASP.NET Core) Practice Exercises and Questions on Database Connectivity
Find a Doctor (Project Step 3)

(watch first 6 mins)

The project has now been configured for database connectivity through Sqlite. The Registration module is fully functional - a user can register as a doctor or a patient - and a database INSERT entry is now working. EMail ID is the primary key. If a record already exists then a DbUpdateException is handled and failure is shown through a validation summary. If the registration is successful, the user is redirected to the login page. If he logs in with wrong email/password then he is asked to ammend and retry. But if he logs in with an email that isn't registered yet, then he is asked to register himself. Next we learn how to consolidate the code through ViewImports.

Note: even though we have added models for DoctorProfile, PatientProfile and Consultation, yet it is not possible to "foresee" everything. Whenever an alteration/addition to DbContext takes place database will always need adjustement - by deletion or by migrating its data.

Ch 4 - Modularity
  1. L01 - ViewImports (10 min)
    (watch first 6 mins )
  2. L02 - Razor Components (20 min)
    (watch first 6 mins )
  3. L03 - Currency Converter Component (10 mins)
    (watch first 6 mins)
Find a Doctor (Project Step 4)

(watch first 6 mins)

In this step we tidy the Index.cshtml, Register.cshtml and Login.cshtml razor pages by moving various common directives (like addTagHelper) and namespaces to a viewimports file. This practice will now be followed throughout the remaining project. Now we are ready to write the home page of doctors. Let us learn the concept of Areas and Partial Views before that.

Ch 5 - Areas and Partial Views
  1. L01 - Concept of Areas and an Authorization Scheme (17 min)
    (watch first 6 mins )
  2. L02 - Partial Views (19:59 mins)
    (watch first 6 mins )
Find a Doctor (Project Step 5)

(watch first 6 mins)

Two "Areas" are added - Doctor and Patient. The pages relevant to a doctor shall stay in the former, whereas of a patient in the latter. Home pages have been added for both. Partial pages for _Header, _Menu and _Footer have also been added for the doctor's area, and similarly partial pages for _Header and _Footer are added for the patient's area. This is what happens now: when a user logs in, then depending on the UserType he is redirected to his "Area". Next let us learn about Authentication and Authorization so that the users of a specific "Role" can only access the pages.

Ch 6 - State Management
  1. L01 - Reading and Writing Cookies (18 min)
    (watch first 6 mins )
  2. L02 - Consent Banner with ITrackingConsentFeature (13 min)
    (watch first 6 mins )
  3. L03 - The Concept of Session (16 min)
    (watch first 6 mins )
  4. L04 - Serializing DateTime into Session (9 min)
    (watch first 6 mins )
  5. L05 - When and how to use TempData (11 min)
    (watch first 6 mins )
Ch 7 - Authentication and Authorization
  1. L01 - Configuring Role based Authorization (15 min)
    (watch first 6 mins )
  2. L02 - SignIn, ReturnUrl and LocalRedirect (17 min)
    (watch first 6 mins )
  3. L03 - Displaying User Info on each Page (7 min)
    (watch first 6 mins )
  4. L04 - SignOutAsync with Tag Helpers (8 min)
    (watch first 6 mins )
Find a Doctor (Project Step 6)

(watch first 6 mins)

Policy based authorization has now been applied. A logged-in doctor ONLY can view the pages of the "doctor" area, and similarly, a logged-in patient only can view pages of his area. RememberMe is also functional now - such a user is directly taken to the home page of his area. Email of a logged in user is now shown on each page he visits. Code for sign-out has also been added. With this the project is now fully functional for login, registration and the sign-out modules. We leave it as an exercise for the student to add a "Change Password" module.

Ch 8 - Database Connectivity - II
  1. L01 - Dropdownlist in a Razor Form (7 min)
    (watch first 6 mins )
  2. L02 - Uploading file(s) and Storing in a Database (16 min)
    (watch first 6 mins )
  3. L03 - Downloading file(s) and FileResult (11 min)
    (watch first 6 mins )
Find a Doctor (Project Step 7)

(watch first 6 mins)

Now we start completing a doctor's profile. Three modules are done - (1) first the doctor's name, phone and photo upload, (2) second the fees he charges, and (3) a dropdown of specializations. A partial view is added for specializations because specializations will be used from the patient side also, during the search of doctors.

Ch 9 - Ajax Communication
  1. L01 - Ajax based POST of a Razor FORM (13 min)
    (watch first 6 mins )
  2. L02 - Ajax based POST without a FORM (11 min)
    (watch first 6 mins )
  3. L03 - Parameterized AJAX GET Request to a C# function (10 min)
    (watch first 6 mins )
  4. L04 - Ajax based EBook style Admin Panel (8 min)
    (watch first 6 mins )
  5. L05 - Authentication and Authorization with AJAX Requests (8 min)
    (watch first 6 mins )
  6. L06 - Inline, In-place Edit, Update, Cancel of records (13 min)
    (watch first 6 mins )
  7. L07 - Master Slave Cascading Dropdowns with Ajax (13 min)
    (watch first 6 mins )
Find a Doctor (Project Step 8)

(watch first 6 mins)

Cascading dropdowns and ajax are used for completing the fourth module of a doctor's profile where the state and city of the clinic address have to be specified. For this we have added a partial view _ClinicAreaPIN to render the cascading dropdowns. A partial view has been added because a patient will also need these dropdowns during his search for a doctor. A JSON based database is used to store the State-City data.

Ch 10 - Understanding LINQ Queries
  1. L01 - SingleOrDefault, Find, FirstOrDefault, Single and First (11 min)
    (watch first 6 mins )
  2. L02 - Where, Include and ToList (10 min)
    (watch first 6 mins )
  3. L03 - How to Sort Records (6 min)
    (watch first 6 mins )
  4. L04 - Direct Execution of SQL Queries and Stored Procedures (9 min)
    (watch first 6 mins )
Find a Doctor (Project Step 9)

(watch first 6 mins)

Partial pages for _Consultation and _Consultations are added for creating/editing a consultation and viewing all the consultations. Then razor pages for Consultation are added to both the doctor and patient. The home pages of doctor and patient are also updated to show all the consultations.

The patient profile module is also completed now.

Ch 11 - Database Connectivity - III
  1. L01 - Status of the App_Data folder in ASP.NET Core (10 mins)
    (watch first 6 mins )
  2. L02 - XML as a database in ASP.NET Core (9 mins)
    (watch first 6 mins )
  3. L03 - Repository Pattern and Dependency Injection with XML as Database (16 mins)
    (watch first 6 mins )
Find a Doctor (Finalized)

(watch first 6 mins)

Module for searching a doctor is now added. A patient starts by searching for a doctor in his area, and clicks to pay and add a new consultation. He can write his illness and upload any pdf report for the doctor.

The doctor's home page shows all the consultations that are not yet completed. Now he answers a consultation and saves it for the patient to view - and the loop completes.

We leave it as an exercise for the student to add a Fees module where a doctor can view all the fees collected in a month. Another module that shows all the consultations of just one patient can also be added. A doctor can reach this page by clicking a link on the consultations that he sees on his home page.


This Blog Post/Article "Course on ASP.NET Core 5 MVC Razor Pages with Project" by Parveen is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Comments and Discussion