Razor Pages for ASP.NET Core – Full Course (.NET 6)

Ecommerce Empire Academy

Learn the basics of Razor Pages for ASP.NET Core. 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 (.NET 6).

✏️ Course developed by Bhrugen Patel. More courses from Bhrugen:

🔗 Longer Razor .NET Core Course:

💻 Code:

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:02:24) Live Preview
⌨️ (0:04:24) Tools Needed
⌨️ (0:05:31) Introduction to .NET Core
⌨️ (0:10:13) Dependency Injection
⌨️ (0:14:48) Create Project
⌨️ (0:17:18) Hot Reload
⌨️ (0:21:42) Razor Pages Introduction
⌨️ (0:22:43) Project File
⌨️ (0:23:55) Launchsettings, wwwroot and appsettings
⌨️ (0:28:29) Programs
⌨️ (0:34:22) Routing Overview
⌨️ (0:39:11) Default Views
⌨️ (0:47:03) Tag Helper
⌨️ (0:49:41) Action Rersult
⌨️ (0:53:19) Create Category Model
⌨️ (0:55:40) Data Annotations
⌨️ (0:58:19) Connection String
⌨️ (1:02:07) ApplicationDbContext
⌨️ (1:06:21) Program.cs Database Settings
⌨️ (1:11:35) Setup Program.cs to use DbContext
⌨️ (1:17:15) Create Database
⌨️ (1:22:57) Categories Get Action Method
⌨️ (1:31:05) Display all categories
⌨️ (1:38:48) Add Create Category Button
⌨️ (1:41:15) Create Category UI
⌨️ (1:44:26) Create Property in Page Model
⌨️ (1:48:29) Create Category and Bind Property
⌨️ (1:55:09) Bootswatch
⌨️ (2:00:41) Server Side Validations
⌨️ (2:06:01) Custom Validations
⌨️ (2:09:38) Display Name and Range Annotation
⌨️ (2:12:58) Client Side Validations
⌨️ (2:17:07) Links for Edit and Delete
⌨️ (2:20:40) Edit Category
⌨️ (2:28:41) Back to List
⌨️ (2:33:05) Delete Category
⌨️ (2:36:43) TempData
⌨️ (2:40:04) Toastr
⌨️ (2:43:13) Partial Views
⌨️ (2:47:29) Scaffold CRUD Pages
⌨️ (2:50:23) Create SQL Database on Azure
⌨️ (2:53:55) Deploy to Azure
⌨️ (2:59:03) Congratulations

🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:

34 thoughts on “Razor Pages for ASP.NET Core – Full Course (.NET 6)”

  1. Finally. This is exactly what I needed. I have always wondered about this and I’ve been able to apply it immediately to my project. Thank you so much. Also. Why does _everyone_ pronounce JSON with that weird o sound? Everyone gives it the same o sound as on, pawn, and lawn. I have always said it like the male name Jason and the word son, fun, run. JSON is like the male name Jason because even if you remove the “a” it still sounds like Jason.

    1. I searched for it and the top results was this..
      “According to Douglas Crockford who introduced JSON, it’s pronounced like the name Jason.”

      I feel slightly vindicated but I also know people say words however they want. It doesn’t really matter as long as your message is conveyed.

    2. @Liquid Flames probably because the ‘O’ in the acronym stands for the word ‘Object’ so they pronounce the ‘O’ in JSON like the word used in the acronym.

  2. M Hedayet Hossain

    A really good tutorial – ASP.NET Core 6, EF Core 6 with Razor Pages – just what I was looking for.

    1. In my experience, one hour of course content is between 2 and 3 hours of typing out the code/debugging/experimenting. Takes some time investment for sure!

  3. Hi! On 2:34:26, can we not just do the following code instead? Seems to be working as well but I am not sure what is the difference:
    public async Task OnPost()
    return RedirectToPage(“Index”);
    Thanks in advance.

    1. You’re missing : await keyword and SaveChangesAsync(); you should check what’s the different asynchronous and synchronous

  4. Super happy to have found this. I’ve got an internship where they create apps with razor pages and I’m completely lost. Hoping this sets me on the right course once I finish the video

  5. Muhammad Khalifa

    Really good an amazing tutorial so useful, I am a C# Windows Form Programmer and found this tutorial very easy for me to start web development.

  6. My 3rd or 4th course now with Bhrugen and DotNetMastery. Very good content. I thought I’d do a short course before diving into the 23 hour course on MVC.

  7. Thank you for this video!! It was a godsend for me! I was wondering if anyone could explain the difference between update database and add migration? I’ve tried Google but still dont really understand the difference…. :S

    1. Bart Heimenberg

      By update-database you physically make the change to the database. Add-migration just and only registers the changes to make to the database. So if you would add a Date (for example) to this Category model, your database is not yet aware of this extra field. Now when you run the ‘add-migration DatAdded’ in your migration folder you will find a new cs file with DateAdded in the name of the file. Now when you open this file, you see an Up and Down method. At this moment, when you check your database table, you don’t see the Date column. Now run update-database, and your Up method will be executed and your table updated. Open your database, open the table and now you see that new column. Hope this helps…

    2. @Bart Heimenberg It definitely does! Thank you so much for taking the time to answer me! ☺️

  8. Great tutorial! I’ve done his MVC as well! Clear explanation and understandable ! Hope he will make Identity / Role based , Google, Facebook authentication and etc /tutorial as well with hosting!

  9. By far the best Razor introduction course I’ve seen on Youtube.
    Everything is so concise and well explained. Thank you, Bhrugen.

  10. Ontario County

    Hello Bhrugen,

    Excellent tutorial. I am new to both C# and Visual Studio 2022 and this amazing tutorial was very easy to follow. Only teeny tiny quibble was trying to follow which CTRL+. that you selected at times because it was done so quickly. There were several times I had to back up a few times and pause to finally catch it!

    I do have a question that I think would help many other users as well. How would I create a drop-down choice box on a form that would link to ANOTHER table? I would like to populate the drop-down with table data, not with a static list.

    For example, let’s say I have a table called “Colors”. I want to have a form so that the user can add more colors to this table (it will look just like the sample form you created in this tutorial. That isn’t a problem, thanks to you! 🙂

    Then, I would like to use this “user updated table” to provide the contents for the dropdown in another form. For example, let’s say I have a form for someone to order a t-shirt. I want a drop-down box on the form for someone to pick their desired t-shirt color. The drop-down would go look at my “Colors” table and display the list of available color choices.

    Meanwhile, that “Colors” table would be kept up to date by a company user (so that IT does not have to go in and change the code to add or remove a color) thereby the drop-down would always have the current colors available.

    One other small question to go along with that. How do I get the choices in the drop-down box to display alphabetically? And, how do I get the fields on the forms in your tutorials to display alphabetically?

    Thanks so much for any and all assistance you can provide!


  11. Bart Heimenberg

    Great introduction to Razor pages. Thanks a lot. Enjoyed every single subject. Will check out your advanced course now.

Comments are closed.