
Install the North Wind database locally and build multiple apps—MVC, Web API, Razor pages, and Blazor—using shared models and identity, then deploy to Azure with a repository pattern.
Learn to reuse code across MVC, API, Blazor, and Azure projects by following the base MVC app, installing the local database and identity tables, and running multi-project solutions.
Install the Northwind database with the provided script or SQL in Visual Studio, then use the local database and review the employees table to start the MVC project.
Learn to scaffold models from an existing database in an asp.net core app, generating a dbcontext and models, with optional data annotations and force override options.
Develop an employee manager app using ASP.NET MVC with tag helpers and EF Core for CRUD, add data validation with data annotations, and ASP.NET Core Identity for registration and sign-in.
Hook our project to entity framework to enable CRUD operations, install EF Core and SQL Server packages, and create a db context with an employee db set.
Create an employee model mapped to the employees table, enforce required fields and string length, and configure a database-generated identity for the primary key with display attributes.
Create and configure the app DbContext by inheriting from DbContext, injecting DbContextOptions via the constructor for dependency injection, and defining a DbSet<Employee> to map to the database.
Create a connection string named app db in the app settings to connect to the local sql server database north lane, and configure the db context to use that string.
Create an employee manager controller that injects the database context, lists all employees with a LINQ query ordered by id, and returns results to a view as the default list.
Create a list view for the employee manager that renders a table of all employees (id, first name, last name, title) from the model using Razor, with bootstrap removed.
Design a get insert action that displays empty fields and a distinct countries dropdown, and implement a post insert with model validation and database save.
learn to implement the update action in asp.net core mvc by loading an employee by id, populating a country dropdown, validating the post with anti forgery token, and saving changes.
Implement a delete action in ASP.NET Core MVC: display a confirmation via HTTP GET, delete the employee on HTTP POST, save changes, and redirect with a temp data message.
Modify the list view to add update, delete, and insert links for each employee, display a temp data message, and use tag helpers to route to the employee manager actions.
Create an update view for an employee by binding fields to the form, hiding the id while displaying it non-editable, and posting to the update action with save and back-to-list.
Create a delete view for a single employee using a form that shows details, posts a hidden employee ID to the delete action, and includes authentication via core identity.
Add ASP.NET Core Identity for authentication and authorization, create AppIdentityUser and AppIdentityRole, set up AppIdentityDbContext, and configure external logins and server-side data storage.
Configure asp.net core identity in startup class by adding app identity db context and identity services, connect via the connection string, and configure login and access denied cookies.
Install and configure entity framework tools, add identity tables to the North Wind database, and update the database to enable identity features such as users and roles.
Create sign in and registration models for a .NET Core MVC app, defining username, password, and remember me with required data annotations and custom display names to support user authentication.
Create a register user model with properties for username, password, confirm password, email, full name, and birth date; validate with data annotations including compare, email address, and required fields.
Create a security controller for user sign in and registration, inject the app identity user, role, and sign‑in managers via the constructor, and assign them to private readonly fields.
Create and validate a register action with http get and post actions, initialize an admin role if missing, build and save the register model, then sign in or display errors.
Sign in displays a username and password view, validates model, and signs in with remember me and forgery token. Redirects to employee list on success; shows invalid details on failure.
Create a sign-out action via http post, authorized for signed-in users, that signs out async and redirects to the sign-in page, with an access denied view.
Authorize the employee manager actions for the manager role, then add a security controller with an access denied view and a simple sign in and registration flow.
Create a registration view with a user form, collecting username, password, confirm password, email, full name, and birthdate, posting to the register action with errors shown and a sign-in link.
Create a sign in view in the security controller with a post action that binds username, password, and remember me, and add links to register and sign out.
Show a sign out option for authenticated users in the shared layout, displaying the user name and posting a sign out form to the security controller.
Create a Razor Pages version of an mvc app in the same solution by reusing models, db context, and identity, updating namespaces, app settings, and startup for Razor pages.
Install and configure entity framework core packages for ASP.NET Core MVC and Razor Pages, resolve context name and namespace issues, and verify the project builds successfully.
Enable razor pages by adding razor pages services and setting the default route to employee manager list. Map endpoints to razor pages and prepare the www root for bootstrap styling.
Add partial views in a Razor Pages project by migrating shared MVC components and configuring the solution to run the Razor Pages project.
create a razor pages list for employees by injecting the db context, querying all employees, and exposing them in a list property with on get and on post handlers.
Create a Razor Pages list view that displays employees in a table with insert, update, and delete actions using tag helpers and model binding.
Create a Razor page for inserting new employees, wire up the db context, and bind an employee model with BindProperty while populating a country dropdown from distinct countries.
Display the view with an empty form and countries dropdown via the on get method, then onPost saves the employee with validation and inner exception handling for DB update exceptions.
Create an insert view for adding a new employee with a post form, including fields for first name, last name, title, birth date, hire date, country, notes, and validation messages.
Create update code-behind for a Razor page in the employee manager, binding the employee, populating country dropdowns, validating input, and saving changes with error handling.
Pass the employee id to the update view, display a prefilled form, and edit fields like first name, last name, title, birth date, and country; validate and save updates.
Create a delete page and implement the code-behind to locate, remove, and redirect after deleting an employee using a deep context, with error handling and temp data messaging.
Create a delete view in a .NET Core MVC app that passes the employee id, displays the employee details, and posts the delete action with a temp data message.
Create a Razor error page to display exception status codes, wire it via status code pages to /error?code={code}, and show the status as an unexpected error.
Create and wire up security pages for access denied, sign out, and sign in using app identity user, sign-in manager, and sign out async, then redirect to the sign-in page.
Create a sign-in page with the sign-in manager, binding username and password, then validate input, sign in asynchronously with remember me, and redirect on success or show error on failure.
Create a sign in view with username, password, remember me, bound to the sign-in model, including a sign in button, validation messages, and a register link.
Create a register page behind the scenes using user and role managers to register users, ensure a manager role exists, create it if needed, assign it, and sign in.
Create a registration view using the register model, with a post form collecting username, password, confirm password, email, full name, and birthdate, plus validation and a sign-in link.
Create a two-project web api in a net core solution by starting with an empty api project, configuring the startup, and scaffolding controllers, models, and repositories for json data.
Install essential NuGet packages for the employee manager API, including Microsoft.EntityFrameworkCore and Design, resolve DbContext issues, align namespaces, and configure startup for a Web API.
Configure the API to use a context with SQL Server by wiring the app settings connection string App DB in startup, and map endpoints to controllers for the repository pattern.
Create a repository interface for employees with select all, select by id, insert, update, and delete, implement it, and inject via the API controller.
Implement the repository interface by creating an employee repository class using sql statements, inject the db context via constructor, and prepare for stored procedure implementations.
Implement an API select all method to return employees by querying the employees table and selecting fields id, first name, last name, title, birthdate, hire date, country, ordered by id.
Implement the API by ID to return a single employee by filtering the employee table on ID, selecting the same fields as the list, and using single or default.
Implement the delete method by executing a delete statement against the employees table, using a placeholder for the id to remove a single record, without returning data.
Implement insert method to add an employee by building an insert statement with fields like first name, last name, title, birth date, country, and notes, using placeholders from employee object.
Implement update method by issuing an update statement against the employee table in the database context. Set first name, last name, title, birthdate, country, and notes from the employee object.
Create an employees controller that inherits from the controller class, routes via api/employees, injects the employee repository into the constructor, and implements actions to list, get, insert, and delete.
Create a restful employee API with controller actions for getting all employees, fetching by id, and creating, updating, and deleting employees, wired via a repository pattern and proper model binding.
During testing, this lecture shows fixing logical api bugs in employees controller and repository, including id handling for put and delete and correcting update with where clause and insert syntax.
Create an ASP.NET Core MVC API client to consume a Web API for employee operations. Use an MVC client rather than direct database access, and configure the project and connectivity.
Copy the employee models and identity components from the NBC project into the api client, updating namespaces and removing the db context to enable api-based CRUD operations.
Configure the http client in startup services to call the web api asynchronously at the localhost base url and the employees endpoint, supporting get, post, update, and delete operations.
Learn how to add an HttpClient in a .NET Core MVC API project, configure base address from app settings, set JSON headers, and register a singleton client for controller use.
Create a managers-only employees controller that injects an HTTP client and configuration to call the employees API, set the base URL from app settings, and prepare country data retrieval.
Create a task to fill the countries dropdown by calling the employees API, parsing with case-insensitive json options, and passing distinct countries as a select list via the view bag.
Fetch the employee list from the api client, read and serialize the string data into a case-insensitive json list of employees, and render it in the main view.
Demonstrates creating an insert action in mvc, presenting a form with a countries dropdown, and posting to a web api with json, handling success and errors.
Fetch employee data with get async, populate an edit view with text boxes and a dropdown, and submit updates via put async to employee API, handling success or error messages.
Implement a delete workflow in the API client with a confirm delete view and an async delete action, then post to the API and redirect to the employee list.
Test the API client by performing insert, update, and delete operations, validate required fields, sign in and register users, and compare API-driven workflows across three projects.
Explore optional stored procedures for the employee API, replacing inline SQL with server-side calls in the Northwind database by creating procedures to select all employees and to select by id.
Create SQL stored procedures for inserting, updating, and deleting employees with parameters for first name, last name, title, birth date, country, notes, and return the new employee id via scope_identity.
Implement a sql stored procedure repository for employees by wiring a db context, injecting it, and implementing list, select by id, insert, update, and delete using stored procedures.
Create and pass an eight-parameter array to the employee insert and update procedures, including an output ID, handle optional notes, and switch to a stored procedure repository.
Explore optional testing within a .NET Core MVC project by inserting, updating, and deleting employees, debugging serialization and stored procedures, and validating API calls to manage employees.
Create an employee manager using Blazor Server app, learn Razor components and hosting models, and integrate ASP.NET Core Identity with lifecycle methods, binding, and validation for interactive UI.
Build a server-side Blazor app using Razor components, Entity Framework, and the repository pattern, with an IEmployeeRepository handling CRUD and a countries list for dropdowns.
Implement a repository pattern by injecting the db context, creating an employee repository that supports delete, insert, select all, and update, and prepare to install entity framework core packages.
Install and configure Entity Framework Core and Microsoft Identity Framework, register the app context and employee repository, set up Blazor server with authentication, and build an employee list page.
Create a razor component named list and set it as a page with the main route and employees/list route. Inject navigation manager and the employee repository, and import web utilities.
Create a Razor component that displays all employees, manage namespaces and models, fetch data via the repository, and display a delete message from the query string.
Create a view list component that renders an employees table with id, first name, last name, country, and title, including update, delete, and an insert link.
Remove unused layout code and bootstrap to establish a simple employee manager layout with a Razor Blazor main layout, and render the body for insert, update, and delete links.
Create a razor insert component for adding employees, inject the repository, initialize an empty employee, load country options, and handle save to insert the employee and display a success message.
Build a Blazor view insert component to add an employee, with a bound model, data annotation validation, and fields for name, birth date, country, notes, and save actions.
Implement a Razor update component for editing an employee, routing to employees/{id}, injecting an employee repository, loading the employee and countries, and saving updates with a success message.
Update employee view in .NET Core MVC shows id non-editably. Validate inputs with data annotations and bind first name, last name, title, birth date, hire date, country, and notes.
Implement a delete component for an employee page, fetch the employee by id, delete via the repository, and redirect to the list with a confirmation message.
Display a read-only employee detail in a table with delete button that triggers the delete method, shows a red warning, and confirms deletion, with plans to add identity-based access control.
Copy the razor pages security folder and identity context into the employee manager blazer app, update namespaces, install Microsoft.AspNetCore.Identity.EntityFrameworkCore 3.1.8, and enable register, sign-in, and sign-out in startup.
Configure ASP.NET core identity by adding identity context, identity user, and identity stores, wiring a sql server connection string, and securing razor pages for sign in, register, and sign out.
Apply the authorized attribute with the manager role to components, adjust sign‑in and list redirects, and implement an authorized layout view with user identity and a sign‑out option.
Practice testing and debugging a blazer app by configuring authorized views, sign-in flows, cascading authentication state, and sign-out behavior, while verifying create, update, delete, and date formatting.
Learn how to migrate a local ASP.NET MVC project to Azure SQL Database, wrap data access with repositories, and deploy the project and ASP.NET Core Identity to Azure cloud.
Create a new Azure database for North Wind in the portal, selecting subscription. Configure server, admin login, copy the connection string, and enable firewall access for IP and Azure services.
Replace the local connection string in app settings with the Azure connection string and password, then create and populate an employees table for the app to use.
Create a secure repository pattern in .NET Core by defining IEmployeeRepository with methods to list all employees, get by id, insert, update, delete, and fetch countries for dropdowns.
Implement the select all method in the employee repository by connecting to the database using a configuration-provided connection string, executing a SQL select, and returning a list of employees.
Create an employee manager controller with a list action that uses IEmployeeRepository to fetch all employees and pass the model to the view, then configure AddScoped for repository with Azure.
Implement the select by id method in the employee repository by creating a parameter, assigning the id value, executing the command, and returning a single employee record.
Implement the insert method to add an employee with id generated by the database, using parameterized values for first name, last name, title, birth date, hire date, country, and notes.
Implement the update method by copying the insert method, updating a single employee’s fields first name, last name, title, birth date, country, notes with parameters and filtering by employee id.
Implement the delete method by wiring a parameterized delete statement that removes an employee by id, opens the connection, executes the command, and closes the connection.
Implement a distinct countries list for a dropdown by selecting unique countries from the employees table, ordering them alphabetically, and returning a string list via the repository and controller.
Create a private method to populate a countries dropdown by fetching all country names from the repository, building ordered select list items, and exposing them to the view via viewbag.
Create and manage employee records using crud actions with http get and post, including insert, update, delete, model validation, country dropdowns, and repository interactions.
Test and debug the app against the Azure database, validating employee creation, listing, updating, and deletion. Fix note handling and prepare for identity to secure access.
Add and configure .NET Core Identity in an Azure database by creating identity migrations, applying them to the identity context, securing the app with role-based authorization, and deploying to Azure.
Publish and test a .NET Core MVC app to Azure, configure Linux app service, connect to the North Wind database, and verify sign-in plus create, update, and delete of employees.
Welcome to my course Beginning .NET Core MVC, Razor, API, Blazor, Azure, Identity.
As the title of the course suggests, this is a course for beginners who want to start Web Development with ASP.NET CORE.
But .NET Core Framework is a vast and complex environment with many different technologies. The goal of this course is to get you started with several of those technologies.
Throughout the course we will create a simple Database driven project using several different ASP.NET Core technologies. We'll use MVC Pattern, Web API and API Client that will consume the API, then Razor Pages, Blazor, and also Azure. Each project will use Entity Framework Core for database access. We will use local server installed with Visual Studio, however, in the last project we will also create and deploy Azure SQL Database, as well as the web app we created. Throughout the course, we'll be using the well-known NorthWind Database. I will show you how to install it on your local server, and later on Azure.
The structure of this course is different than what you may be familiar with. We will create the exact same project with each of the technology. That’s because the goal of this course isn’t to integrate all the technologies into one project, but to give you a good overview of the strengths and weaknesses of each approach. And that is best done by creating the same project with each individual technology because that allows you to compare how each of the technologies works side by side.
But wouldn’t creating the same project over and over be quite a boring experience? I promise it won’t be. Even though the project remains the same for each technology, I packed each implementation with different ways of doing things. For example, we’ll be using different approach to CRUD operations. In one project we’ll use LINQ queries, in another we’ll use SQL statements, we’ll also use SQL Stored Procedures, and also SQL Client Object Model. We’ll also implement Repository pattern, and add .Net Core Identity to each implementation. We will use Local Server, but also Azure SQL Database. And of course, each technology and requires different approach with different structure for the whole application. So no, it won't be boring, quite the opposite!
So why to take my course? You see, a typical ASP.Net Core course shows you lots of different concepts by building a single big project. You start with empty template and several hours later you have a finished project with lot of advanced concepts, and technologies. And for some students, this works fine. But a typical beginner usually gets lost half way as the sheer amount of concepts and technologies presented in such course is way too everywhelming. You find yourself mindlessly coding along the instructor, only to realize at the end, that you don’t remember any of the concepts presented at the earlier lessons.
Like I said, the structure of my course is very different. My goal is to not only present the concepts, but also re-enforce them throughout the course. This course is all about .Net Core technologies. This way we can truly concentrate on mastering the ASP.Net Core framework and concepts. So by the end of the course, not only you will remember all the essential knowledge and skills, but you will also understand and remember the more advanced ones as they are introduced slowly, thoughtfully, and in step-by step way.
So get excited to learn a lot of new material and dive into the world of .Net Core. The course makes the learning easy with the mix of introduction of new material, and practical coding! Every step is explained every time to make each project easy to follow.
See you in the course!
Let's code!