
Learn ASP.NET Core 6 from scratch and build MVC websites, RESTful APIs, and clients, while mastering Entity Framework, Core Identity, and essential web development concepts with no prior experience required.
Use Visual Studio 2022 Community as the primary ide, with vscode for aosp development, chrome for browsing, and postman for web services; clone the repo, view commits, and access code.
Create a new ASP.NET Core project using the core empty template, configure launch settings and http port to 3000, then run with dotnet watch for hot reload.
Understand how the http request travels through the middleware chain in the request pipeline, where components inspect, modify, or generate responses, manage cookies, and format specific data types.
Explore how services use dependency injection to access features across an ASP.NET Core app, configure startup with program.cs, set up middleware and endpoints, and manage dependencies in the csproj.
Create and integrate custom middleware in the ASP.NET Core pipeline, using HTTP context, method and query string to conditionally set the response content type and demonstrate next versus next invoke.
Define a class-based middleware in ASP.NET Core with a private request delegate, constructor, and invoke method, then register it via app.use middleware to forward HTTP context to the next component.
Understand how middleware modifies the HTTP response in the return pipeline path after the next function runs, by appending to the response body and adjusting the status.
Discover how to short-circuit the request pipeline in ASP.NET Core by omitting the next delegate, returning a response immediately for certain URLs while others continue.
Learn how to create pipeline branches with the map method to route specific URLs to a terminal middleware, and how branch and run middleware behave with or without next.
Configure middleware with the options pattern by defining a fruit options class, binding defaults, accessing IOptions in middleware, and exposing a /fruit endpoint that returns configured values.
Explore dependency injection by creating a services folder, implementing IResponseFormatter with text and HTML formatters, and registering a singleton for use in endpoints with HTTP context.
Learn to create a custom middleware, inject a response formatter via the constructor, and register the middleware in program.cs to handle the /middleware route.
Access services from the http context when a constructor is unavailable, resolving required services via request services for an endpoint. Register the endpoint with map get and test the url.
Register AddTransient services with the dependency injection container to create a new implementation instance for every dependency resolved, highlighting life cycle differences with singletons and scoped services.
Explore how scoped services share the same object per HTTP request, balancing singleton and transient lifetimes, and learn why resolving scoped services from the root provider fails.
Learn how appsettings.json holds general settings and environment-specific files for development, staging, and production. Adjust the default log level from information to debug and grasp the 0-6 severity scale.
Learn how to access configuration data via a service or dependency injection, expose it at the /config endpoint, and observe logging levels switch from development debug to production information.
Apply the options pattern to configure middleware from app settings, create fruit options, bind the fruit section, and wire the fruit middleware to display watermelon at /fruit.
Retrieve environment settings from the launch settings JSON and config, use app environment to check is development or is production, and verify by refreshing the page.
Use the logging service to emit debug messages from the fruit middleware, using the class as the logger category, to track requests and pipeline configuration in the program file.
Create a www root folder for static content, enable static files middleware, and integrate Bootstrap via Libman to manage client-side libraries and apply Bootstrap styles to a static page.
Demonstrate cookies in asp.net core 6 using http request and response in middleware, increment a counter cookie via context request cookies and context response cookies, and clear with cookie options.
Learn to enable and manage sessions in ASP.NET Core 6 by configuring services, adding distributed and memory caches, and using session middleware to store string and integer values.
detect https requests, enforce https redirection, and enable hsts with subdomains and a max age in production to require secure connections.
Install and verify EF Core CLI tools with dotnet tool install --global dotnet-ef, then add the EF Core Design and SQL Server packages via NuGet, and ensure localdb is installed.
Create data models for products and categories in ASP.NET Core, define a decimal price column, and establish a one-to-many relationship, with models in a Models folder.
Create a data context class in the infrastructure folder that extends DbContext, and define DbSets for products and categories to enable database access.
Configure the database service with a data context and connection string, create an initial migration, and apply it to build core db tables; drop and recreate if needed.
Seed the database by creating a data context, migrating the database, and adding fruit and shirt categories and products, then save changes and verify via view data.
Create a simple web service with ASP.NET Core 6 by building endpoints to list all products, get a product by id, and add new products via JSON.
Enable controllers, choose the mvc or api template, add controllers, and implement a products controller with get methods returning json via api/[controller].
Inject a data context via the controller constructor and use from services to inject a logger, then retrieve products and log actions to demonstrate DI in controllers.
Learn how the MVC framework uses the request URL for action parameters via model binding, injecting the id from the URL (for example /1 or /2) to fetch a product.
Use model binding from the request body in a post action to receive a product and save it to the database via api/products.
demonstrates adding update and delete actions in asp.net core 6, using modal binding for update, and url key for delete, with ef core save changes ensuring bananas are removed.
Learn to convert action methods to asynchronous patterns in a .NET Core app, using async enumerable, find async, and save changes async, while update and delete remain synchronous.
Learn how ASP.NET Core action methods return concrete responses by producing objects that implement IActionResult, yielding 200 ok, 204 no content, or 404 not found for existing or missing products.
Master basic redirection in ASP.NET Core by returning redirect with a URL string like /api/product/1. Use redirect to action or redirect to route to a named action or controller.
Apply data annotations to product model properties for basic validation in an ASP.NET Core 6 app, including required and range constraints, and validate with ModelState.IsValid in the post method.
Apply the ApiController attribute to web service controllers to modify model binding and validation, allowing omission of the FromBody attribute in POST and PUT requests.
Omit null properties by returning only selected fields or by configuring json options to ignore nulls. Apply the options pattern in Program.cs to set a default ignore condition.
Create a categories controller to fetch related data with entity framework by using include to load category products, and fix object cycle issues by adjusting navigation properties.
Install and configure the Newton's of JSON package to enable json patch in ASP.NET Core. Use an HTTP patch with a patch document to update a category and save changes.
Learn to specify action result formats in ASP.NET Core by using the producers attribute to constrain output to JSON or XML, test multiple formats, and apply consumes to restrict requests.
Enable controllers with views, implement convention routing with the default pattern, create a home controller and async index action that returns a view using the data context.
Learn how ASP.NET Core controllers rely on convention routing instead of the root attribute, and enable the same routing with app.MapDefaultControllerRoute, keeping Home as the default.
Show how to display a product in an ASP.NET Core 6 Razor view by mixing HTML and C# to render a product model's name and price in a Bootstrap-styled table.
Select a view by name in asp.net core 6 by overloading the view method and passing a string such as fruit, watch hot reload and category id changes.
Learn how the Razor view engine uses the controller and shared folders to reuse content, then create a shared view and render it via the common action.
Specify the view model to track expressions during development, enabling IntelliSense and preventing runtime errors when accessing non-existent properties in Razor views.
Add the underscore view inputs file to specify namespaces searched for types, using the MVC template. Include core models and category ID, then confirm the home index runs.
Explore razor syntax directives and expressions, including if, switch, and for each, and learn how parentheses distinguish code from static content.
Learn to enumerate a product collection in Razor by creating a list view, setting the model to IEnumerable<Product>, and using code blocks to compute the average price and percent.
Explore how the ViewBag passes extra data from the controller to the view using a dynamic object, and how TempData preserves data across requests for flash messages after redirects.
Create and apply a Razor layout named underscore layout in the views shared folder to provide common content for multiple views, using render body and a view title with Bootstrap.
Use the _ViewStart file to set a layout for all views in the views folder. Create it via add new item and verify the layout applies to pages like home/list.
Override or disable a layout by setting it to null or specifying another layout in the view start; try a different layout like underscore layer two.
Explore using layout sections in ASP.NET Core 6, defining header and footer sections in views, rendering them in the layout, handling optional sections, and testing across pages.
Explore building and using partial views in ASP.NET Core MVC by creating row partials, passing models, leveraging tag helpers, and nesting partials with view data for dynamic list rendering.
Learn HTML and JSON encoding in ASP.NET Core 6 by encoding HTML in the home controller, using HTML raw, and serializing the model to JSON for layout sections.
Create a Razor page named categories that displays a list of categories by injecting a data context into the page's constructor and iterating over context.categories.
Explore Razor pages as a simplified, coexisting MVC option in ASP.NET Core, including setup, routing, page models, and handlers, with practical code examples and page-level access to data.
Demonstrate razor pages routing by adding a categories/list page, fetching category names from the context, rendering them in a ul list, and applying the shared layout to the page.
Learn how to specify a routing pattern in a Razor page, switch from query string binding to segment variables, and navigate routes such as /index/2 and /list/categories.
See how Razor Pages handler methods use the action result interface to control responses, with returning page from a handler like index illustrating the same implied result as the view.
Explore PageModel action result methods by using not found and redirect, creating a not found razor page, and wiring a custom not found url such as /no-product to demonstrate redirects.
Walks through creating a Razor page named edit, wiring get and post handlers to edit a product, update price via model binding, and redirect back to same page after submission.
Define multiple handler methods in a page model and route requests via a handler query string or routing segment; load product and category data on the handler selector page.
Learn how to use partial views in Razor Pages by enabling helpers, creating a _product_partial in Pages/Shared, and rendering a product with name and price in the index.
Learn to create reusable view components in ASP.NET Core 6, pass data without model binding, and render them via component invocation or tag helpers, including the view component attribute.
Discover how view components return views in ASP.NET Core 6, using a shared components folder to render a product listing with an enumerable product model (name, price, category).
Learn how to return HTML fragments from a controller using the content method, which encodes its argument by default, and render unencoded HTML with HTML content view component result.
Explore view component properties that describe the current request, including HTTP context, route data, view bag, and view data, then distinguish controller versus razor page requests using route data.
Parent views provide context data to view components using IViewComponentResult, a string class name, and invoke async to pass data as an object for product listing.
Create an asynchronous view component in ASP.NET Core, implement InvokeAsync, use an http client to get async content, and return a view with a model.
Description
Are you ready to start your ASP.NET journey?
This 7 hour course will take you from a beginner to being an ASP.NET developer!
Learn ASP.NET Core 6 / .NET 6 from scratch and become an ASP developer!
This course will take you from being a beginner in ASP .NET to being able to develop custom, real-world websites and web services!
This course is for anyone with some C# knowledge that wants to start developing using ASP .NET Core 6 / .NET 6
The course is designed to take you from a beginner level to an advanced level where you are able to develop your own custom websites and application.
Learn about middleware, dependency injection, MVC, Razor Pages, tag helpers, web services, view components and much more, all in one course!
What are the requirements?
Some c# knowledge
Some web development experience
Previous ASP knowledge is helpful but not at all necessary
What am I going to get from this course?
Beginning ASP.NET Core 6
Middleware
Dependency Injection
Configuration
Sessions
Cookies
Entity Framework Core
Web Services
MVC
Razor Pages
View Components
Custom Tag Helpers
Tag Helpers
Form Tag Helpers
Model Binding
CRUD
Identity
Role Management in ASP NET Core Identity
Database Migrations
Areas
Whether you are looking to learn everything from scratch or just cover specific areas, you will find it in this course!