
explore clean architecture in dotnet core mvc from ground zero, mastering fundamentals and file organization while progressively adding features. observe deliberate bug demonstrations and keep pace with dotnet updates.
Build a resort website with login, registration validations, and role-based admin or customer flows. Manage villa availability, bookings via Stripe checkout, and admin create, read, update, delete operations and invoicing.
Explore the differences between the complete guide and clean architecture in .NET Core MVC, highlighting architecture choices, authentication approaches, deployment options, and feature variations.
Trace the dotnet core evolution from web forms to a cross-platform, cloud-ready framework with built-in dependency injection, rapid upgrades, and strong performance, previewing dotnet core 8 on Windows.
Master clean architecture in .NET Core MVC, applying repository pattern and unit of work with EF Core, net identity security, and role-based UI for a resort website.
Ensure you meet prerequisites by confirming basic knowledge of C#, .NET web development, HTML, CSS, JavaScript, and fundamentals of MS SQL Server, including select statements and joins.
Identify and install the essential tools for the course: dotnet eight, Visual Studio 2022 (preview and release options), and SQL Server with SQL Server Management Studio on your local machine.
Learn to seek help when debugging: Google the error, then use Udemy Q&A and provide a GitHub link with issue definition and steps to reproduce.
Navigate to dotnet mastery.com to access GitHub code, commits by section and lecture, and download the project resource with code snippets and images for the course.
Explore clean architecture, a circular, layered pattern that enforces inward dependencies from presentation and infrastructure toward the domain, with domain, application, infrastructure, and presentation layers.
Create an asp.net core mvc project in visual studio 2022, select none authentication, use dotnet eight if available, name bulky web under bulky solution, then review the solution explorer.
Explore the default dotnet web app, run it to see header, footer, body, and navigation, and inspect the Bulky Web project file for the target framework and implicit using.
Learn how launchSettings.json defines run configurations, profiles (http, https, IIS Express), and environment variables to switch between development and production databases and keys.
Explore the wwwroot folder as the home of static content—css, js, images, and the lib with bootstrap and jquery—and learn how appsettings.json stores secrets, connection strings, and environment-specific settings.
In .NET, Program.cs replaces Startup by wiring services with AddControllersWithViews and configuring the middleware pipeline, handling environment, static files, routing, authorization, and the default home/index route with an optional id.
Explain how models, views, and controllers collaborate in a .NET Core MVC app, with routing directing requests to a controller that guides data from models to the view.
Explore how routing defines where URLs send requests in an mvc app, focusing on the controller and action pattern, optional id, and the default home/index route configured in program.cs.
Identify the controller and action from a URL using routing in mvc. Create and organize views under a controller-specific folder, and use default routes to load index or privacy pages.
Explore how default views are composed with the underscored layout as the master page, using render body, view start, and shared views, with global view imports and partials.
Learn how IActionResult serves as the base abstraction for all action method returns and how derived results like view result, redirect to action, and json result work.
Dependency injection uses a container to supply interface-based implementations of email and database services, boosting loose coupling and enabling framework-supported wiring in .NET.
Demystify how controllers and action methods return views and action results in .NET Core MVC, and learn that nothing is magic; everything is programming.
Start the final project by creating a new project and deleting the existing one, resetting your setup to focus on the core fundamentals.
Create a new MVC application in Visual Studio 2022 using dotnet eight, save as White Lagoon solution with a White Lagoon dot web project, and skip authentication for later configuration.
Learn to add to source control with Git and GitHub in Visual Studio, create and push the initial commit, and verify the repository on GitHub.
Create and configure a clean architecture solution by adding domain, application, and infrastructure projects as class libraries in c# using .NET 8, and remove the default project.
Create villa model in the domain layer with id, name, description, price, square feet, occupancy, imageUrl, and created and updated dates, and enable code-first EF Core with SQL Server.
Configure EF Core in the web project by installing SQL Server, EF Core Design, and EF Core Tools NuGet packages, ensuring consistent .NET 8 preview versions for infrastructure repository work.
Configure entity framework core by creating the application db context in the infrastructure project, extending DbContext from Microsoft.EntityFrameworkCore, and forwarding options to the base constructor for dependency injection.
Learn how to add and configure a database connection string in appsettings.json, use the default connection name, and wire the db context for local and environment settings.
Register the application db context in Program.cs by adding dbcontext to the services container, wiring it to use sql server with the default connection string from appsettings.json.
Create a database with entity framework core tools using add-migration and update-database in the package manager console; observe a migrations history table.
Create a villa table in the database using Entity Framework Core by defining a DbSet<Villa> in the application DbContext, adding a migration, and updating the database.
Discover how EF Core migrations work in an mvc app, using migrations history and model snapshot to create new migrations, rename villa table columns, and apply updates.
Seed data for villa table via the application db context by overriding on model creating and using model builder has data, then migrate and update database to insert three villas.
Create a villa controller in the mvc web project to perform villa CRUD using entity framework core. Inject the pre-configured application db context and retrieve all villas with _context.Villas.ToList().
Add and bind a villa index view by creating the villa index in the correct controller folder, passing the villa list to the view, and updating the shared layout navigation.
Display the villa list on the UI by passing an IEnumerable<Villa> model to the view and rendering it with Razor syntax in a Bootstrap table.
Enhance user interface of a net core mvc app with bootstrap styling, card layouts, and div wrappers, and connect a create villa button to the Villa controller via tag helpers.
Add bootstrap icons to a .NET core mvc project by installing bootstrap icons nuget package, adding the css to the underscored master page, and inserting icons such as plus circle.
Enable a dark Bootstrap theme in the project by upgrading to Bootstrap 5.3.1 via CDN, updating the underscored layout, applying data-theme='dark', and adjusting navigation for a dark background.
Configure a new create action and corresponding create view in the villa controller to enable creating villas from the index page, with proper routing and view naming.
Create a villa form with the asp-for tag helper to bind inputs to the villa model and post the villa on submit, with automatic binding.
Create a villa UI by building a form with inputs for name, description, price, square footage, image URL, and occupancy, plus submit and back options using bootstrap styling.
Use the display attribute from data annotations (System.ComponentModel.DataAnnotations) to customize form labels, changing names like image URL or price per night.
Create a post endpoint in the villa controller to accept a villa model, add it via Entity Framework Core, save changes, and redirect to the villa index page.
Explore server side validation in ASP.NET Core using model state to prevent empty fields, display errors with validation spans, and return to create view when invalid.
Explore more data annotations in .NET Core MVC to validate models with range, max length, and required attributes, and observe server-side validation for emails and custom rules.
Implement custom model validation in ASP.NET Core MVC by adding errors to the model state, binding them to properties, and using an ASP validation summary to show non property errors.
bind a custom error to a property in a .NET core mvc form by using the property name as the error key, and explore validation summary options like all.
Enable client-side validation by including the validation scripts partial with the partial tag helper and jquery validation in dotnet core mvc, reducing page refresh and deferring server-side checks.
Add edit and delete buttons on the villa index page, pass the villa id via asp-route parameters, and adorn the actions with bootstrap pencil and trash-fill icons.
Implement update endpoints in the villa controller, including a get-by-id to display details and a post to apply updates using Entity Framework Core.
Learn to build the villa update UI in a .NET core mvc app by reusing the create view, enabling client-side validation, and planning the update post endpoint.
Explore multiple ways to retrieve data with Entity Framework Core, including where filters, first or default, and find on primary keys, all without writing SQL.
Learn to handle not found errors by routing to a dedicated error page in clean architecture dotnet core mvc, and redirect to the home controller's error action with dummy id.
Shows updating a villa record with entity framework core, converting the create endpoint to update, and requiring an id submitted via a hidden input to prevent new records.
Define delete villa user interface by reusing update view, create get and post endpoints for delete, disable inputs, remove validation, and style delete action as danger with a trash icon.
Delete in action demonstrates implementing a post delete endpoint, retrieving villa from the db context, removing it if not null, using the is operator for null checks, and saving changes.
Learn how to implement temp data notifications in .NET Core MVC to show success or error messages after create, update, or delete operations.
Discover how to add toastr toaster notifications to a dotnet core mvc project by embedding the javascript and css cdn, jquery prerequisites, and sample usage for success, error, and warnings.
Move the toaster notification code to a partial view in the shared folder and render it in the layout with an underscore name to reduce code duplication.
Add a header logo and footer in the underscored layout using resort.png at 35px. Learn css isolation and scoped css in dotnet six, with runtime bundling into White Lagoon.web.Styles.css.
Discover how to use global using statements in view imports to simplify references to White Lagoon domain entities, such as Villa, and keep crud operations in Villa views clean.
Create a villa number entity with a foreign key to villa and a primary key without identity, enabling crud operations in mvc, then seed data and create a migration.
Demonstrates building CRUD for villa numbers in a .NET Core MVC app by cloning the villa controller, adding a villa number controller, and wiring the index view.
Develop the villa number create view and action in a .NET Core MVC app, handle posting a Wheeler number, and validate the model state with a display property.
Remove model state validations by bypassing the villa navigation property in villa number creation, using model state remove or the validate never attribute, and configure the app package.
Learn to populate a dropdown with villa names by projecting villas from the database into select list items for the create view, using underscore db and entity framework core.
Discover how view data transfers a villa list from controller to the view as a dictionary, enabling a select tag helper to bind the chosen villa id.
Demonstrate how view bag, similar to view data, uses a dynamic type to transfer data from controller to the view, accessed with view bag dot name in the create view.
Replace view bag and view data with a strongly bound villa number view model in a .NET Core MVC app; bind the model and populate the villa list dropdown.
Learn to load navigation properties with entity framework core using include to join villa and villa number tables, display villa names, and chain includes for nested navigation properties.
Implement a duplicate check for a villain number and display a toaster notification when it already exists.
Ensure villa numbers are unique during creation by using entity framework's any to detect duplicates. Validate the model state and repopulate the villa list dropdown with notifications when duplicates exist.
Implement an immutable villa number rule: once created, a villa number cannot be updated; users can delete and recreate. Improve the update UI with dropdown loading and view reuse.
Update post in action by managing the villa number in the update flow with a disabled or hidden input, ensuring the value reaches the post endpoint for validation.
Delete in action demonstrates deleting by villa number id, updating the post endpoint, and validating removal from the database with a delete view and successful crud functionality.
Replace magic strings with nameof for redirects to action methods in .NET Core MVC, surfacing errors on misspellings and promoting clean code and best practices.
Learn to implement a villa repository interface in clean architecture, using dependency injection and a generic repository to perform villa crud with get all, get, add, update, remove, and save.
Define the repository contract in the application layer and implement it in the infrastructure layer with VillaRepository, then register it as a scoped service.
Clarify clean architecture by outlining proper cross-layer dependencies: web on infrastructure, infrastructure on application, application on domain; avoid circular references and duplication, and note common pitfalls.
Implement the villa repository with the application db context, adding, updating, removing, and saving changes for villa entities, and flesh out the get and get all methods.
Implement get and get all in the repository by querying the villa set with an optional filter and including navigation properties via a comma-separated, case-sensitive include list.
Replace direct db context with the villa repository in the controller using dependency injection and CRUD via the repository interface.
Consolidate base data access into a generic repository, define a generic interface in the application layer, and implement the generic repository in the infrastructure layer for any class T.
Move the code from villa repository to a generic repository by injecting the db context and implementing add, get all, and remove operations for any entity.
Implement a unit of work over repositories by creating IUnitOfWork with a Villa repository, wiring it to the application db context, and registering it in program startup.
Refactor the villa controller to use the unit of work via dependency injection, replacing the villa repository, enabling correct crud operations on the villa entity.
Move save logic into the unit of work by adding a void save method that calls db save changes, eliminating save calls from individual repositories like villa repository.
implement the villa number repository within a unit of work, replace the application db context in the villa number controller with ai repositories, and ensure full functionality.
Define and wire a villa number repository within a unit of work, update the infrastructure and controllers, and enable include properties for related data.
Introduce an IFormFile property for the villa model, mark it not mapped, and enable image upload and saving on the server under wwwroot/images/villa via the controller and view.
Enable image uploads on the villa create form with multipart form data, receive the image as a form file, and save it to the root folder via web host environment.
Upload villa images by renaming the file to a random keyword while preserving the extension, validating png or jpeg, saving to images/villa-image, and displaying it on the edit page.
Display update image by rendering image url in an img tag, and use a hidden url with an upload input to replace old image when a new image is uploaded.
Update villa image handling in .NET core mvc: delete old local image before uploading a new one, preserve existing image URL when no new image is provided.
Identify and fix a form update issue where image upload is required; upload a new image, replace the old one, and ensure create and update villa operations work as expected.
Implement delete functionality for villas by removing the associated image when deleting a villa, ensuring image deletion during create, update, and delete workflows.
Practice building a new amenity model with four fields, add a migration, and configure a villa-friendly repository and unit of work to perform crud operations with a Villa dropdown.
Create an amenity model with id, name (required), description (nullable), and villaId, seed data in application db context via a DbSet amenities; prepare repository and unit of work for CRUD.
Create the amenity table, add a migration in the infrastructure project, and seed data for villa IDs 1, 2, and 3, then update the database to apply migrations.
Create and configure the amenity repository by duplicating the villain number repository, renaming classes, and adding the amenity repository interface and unit of work integration.
Configure the amenity repository, scaffold an amenity controller by renaming the villain number controller, and create an amenity view model for the dropdown; verify the build.
Create the amenity views, copy the index view from villa number, and configure the amenity controller with id and name and route for create and delete.
Create, update, and delete amenity records by implementing amenity views, wiring controller actions, and validating CRUD flows in a .NET Core MVC project.
Add a bootstrap dropdown to the navbar labeled content management, update anchor items, fix script and bundle errors, and refine active styling while navigating hot reload quirks and scoped css.
Design the home view model to drive the home page with a villas enumerable, check-in date, check-out date (date only), and nights for accurate villa display and availability.
Populate the home index action with a unit of work to fetch all villas, convert check-in dates to date only, and pass the home view model to the view.
Load villa amenities in the home controller by leveraging a one-to-many relation and an include on the villa navigation property, populating the VillaAmenity collection with entity framework core.
The home controller passes the home view model to a Bootstrap-based UI built with HTML and CSS, with the underscore layout adjusted for a full-width image slider.
Bind the home view model to the index action, render a date input with a default date, and populate a 1–10 dropdown using a razor for loop.
Display the check-in date and number of nights on the home page while listing all villas from the home view model, with dynamic details and per-villa modals.
Learn to implement dynamic modal ids in the villa details view by binding the modal target to villa.id, so each villa opens its own modal.
Paste villa details UI on home page and bind it to dynamic villa data (image URL, name, description, occupancy, square feet, price) and render amenities with for each loop.
Move the villa details row from the modal body to a partial view named _villa_detail, completing the assignment by refactoring the selected code into a reusable partial.
Create a shared partial view for villa details, wire it into the index, and pass a villa model to render details, highlighting isolation and future use in other views.
This is a Beginner to the Advance level course on ASP.NET Core using Clean Architecture that will take you from basics all the way to advance mode. This course is for anyone who is familiar with ASP.NET basics and wants to know how to architect and code real-world applications in ASP.NET Core
This is 100% hands on course where you will learn advance concepts with reports, charts, payment processing and much more in .NET Core
White Lagoon Website is filled with advanced concepts where customers can view the villa rooms in resort and making bookings with their credit cards. Admin can then view the bookings, check in/checkout the customer, and view the summary on their dashboard while managing all the villa via CMS that we will build for admin users.
What are the requirements?
6+ months knowledge of C#
Visual Studio 2022
SQL Server Management Studio
What am I going to get from this course?
Learn structure of ASP NET Core Project
Learn identity security of ASP NET Core using MVC
Build applications using ASP NET Core using MVC
Repository Pattern
Clean Architecture
Integrate Identity Framework and learn how to add more fields to Users
Integrate Entity Framework along with code first migrations
Authentication and Authorization in ASP.NET Core
Accept Payments using Stripe
Admin Dashboard
Charts in .NET Core
Build dynamic pdf, ppt, word in .NET Core
Data Seeding and deployment to MyWindowsHosting