
Build a real-world YouTube clone with dotnet core mvc from scratch, featuring user registration, channels, video uploads, likes, comments, subscriptions, robust authentication via ASP.Net Core Identity, and deployment to Azure.
Discover how to access the course source code on GitHub, view commits by section, and review added and removed code, while exploring course resources, UML diagrams, migrations, and sample assets.
Create a clip share project in Visual Studio as an ASP.NET Core MVC web app on .NET 8 with no authentication; push to GitHub via git init, add, and commit.
Apply a bootswatch sandstone theme via bootstrap.css, update the layout and navbar styling, and implement a static is_active helper for dynamic active nav highlighting with razor runtime compilation.
Rename the models folder to view models, create core and data access class libraries for a multi-tier architecture, and map entities via UML, including app user derived from identity user.
Create app user and app role classes from identity, and define a base entity with an int id to serve as the primary key for category, channel, and video.
Create and configure entity models for comments, subscriptions, and like and dislike relations in a .NET Core MVC YouTube clone using bridge tables, primary and foreign keys, and navigation properties.
Learn to add identity db context, configure EF Core with SQL Server, create data models, define primary key as app user id plus video id, and apply configurations.
Configure SQL Server connection, add db context with EF Core to use SQL Server, install EF Core design package, and apply migrations to create identity, category, channel, and subscribe tables.
Implement a context initializer via a web application builder extension, apply pending migrations automatically, inject context using the scope's service provider, and automate database setup before running the app.
refactor the solution by moving utilities to a separate project, then seed three roles (admin, moderator, user) and three users using ASP.NET Core Identity with async initialization.
Configure identity core services, role and user managers, and cookie authentication in a .NET Core MVC app, enabling roles like admin and user and defining login and access denied paths.
Develop an account controller for login and register using user manager and sign-in manager; implement a login view model and login form with return URL handling and bootstrap icons.
Implement login post in an ASP.NET Core MVC app by validating anti-forgery tokens and model state, and enable client-side validation with a validation script partial for Bootstrap error messages.
Implement login post: resolve username or email, set return URL with null coalescing, build claims identity with name and roles, and sign in via cookie authentication to enable layout changes.
Create authentication partial view with login and register, integrate it into the layout, and implement User Claims Extensions to read username and user id from claims for sign-in and sign-out.
Build a register form with a register view and register view model, including email, name, password, and confirm password fields with validation rules and regex checks.
Build register form (post) in .NET Core MVC by validating input, enforcing anti-forgery tokens, checking email and name uniqueness, creating the user with a role, signing in, and redirecting home.
Implement role-based access in a .NET Core MVC app by creating an authorized channel controller, an access denied page, and a login flow that restricts content to the user role.
This lecture defines the base repository interface, IBaseRepo, a generic pattern for decoupling data access from application logic, with async methods for add, get, and query operations.
Develop a generic base repo for EF Core data access, implementing add, update, remove, and any async; provide get by id and get all with includes and optional order by.
Master the unit of work pattern by creating a channel repository derived from a base repo, injecting a data context, and implementing save changes async.
Provide the unit of work as a service by wiring category and video repositories through interfaces, and register it in the app builder for dependency injection.
Implement a core controller as a base for other controllers and inject a unit of work via dependency injection, enabling derived controllers to access repositories and perform async operations.
Create channel part 1 teaches building a channel creation form, validating name and about fields, and handling redirects, error handling, and model state in a .NET Core MVC app.
Implement custom validation to prevent duplicate channel names using the channel repo, create the new channel for the current user, and surface success or error notifications via a partial view.
Pass a channel model across actions using session in ASP.NET Core MVC, storing the model as json via httpcontext.session.set string, retrieving with get string, then remove to reset.
Implement an admin category management module secured for the admin role, featuring an admin dropdown in the underscore layout, an admin controller with a category action, and Ajax-based CRUD.
Develop an API response class with status code, title, message, and result, implement an admin get categories endpoint returning category view models, and populate the table via ajax.
Learn to populate a categories table from data using jQuery, render dynamic table rows, and implement display and edit modes with save, cancel, and delete actions.
Learn to implement edit category workflows with a save handler, server-side add/edit category endpoint, and Toastr notifications that update the UI and confirm changes.
Learn to implement dynamic category creation in a .NET core mvc app by adding a new table row with an input, save and cancel actions, and frontend and api validation.
Delete category with a confirmation modal in a .NET Core MVC CRUD flow, using a partial view, promise-based confirmation, and ajax delete with API response.
Create a tabbed channel page with videos, analytics, and profile, persisting the active tab via local storage, and enable an editable profile form with update and cancel actions.
Implement the edit channel action to validate the model, fetch the current user's channel by cookie-based id, update name and about, then save and redirect.
Build a create/edit video workflow in a .NET Core MVC app by implementing a video controller with authorization, a video add/edit view model, and upload settings from appsettings.json.
Build a create/edit video form with a category dropdown from get all async, multipart file uploads, image preview via file reader, and validation for edit or create modes.
Implement create and edit video flows in a .NET Core MVC app by validating model, handling HTTP post, and enforcing image and video checks with content type and size validation.
Create and edit videos in a .NET Core MVC app by validating input, handling thumbnail and video uploads, and persisting changes with a unit of work.
Save uploaded video files to a database by converting them to a byte array with their content type, using repository and unit of work patterns.
Implement a thumbnail upload workflow in a .NET Core MVC YouTube clone by creating a photo service, saving uploads to images/thumbnails with random names, and replacing old images via dependency injection.
Finalize create and edit video workflows in a .NET Core MVC YouTube clone, enabling image and video uploads, thumbnail previews, content-type validation, and user ownership checks.
Extend the database with a video view bridge and CreatedAt timestamp, run a migration, and seed videos, images, users, channels, and categories for the app.
Seed videos and images by converting files to IFormFile, creating video entities with contents and thumbnails via photo service, assigning channel ids, and initializing seed data.
Modify the channel page to display paginated videos for a user, with sortable columns (title, date, views), and provide edit and delete actions while wiring front-end pagination to back-end logic.
Create base pagination parameters (including max page size) and a paginated list to support a video grid channel dto retrieval via repository queries using skip, take, and sort.
Implement get videos for channel grid api endpoint in the video controller, retrieve the user’s channel and videos via unit of work, and return a paginated video grid channel DTO.
Render the videos table body by fetching data.result and populating rows with video fields, then implement pagination controls with first, previous, next, and last buttons and items per page option.
Build a delete video endpoint in an ASP.NET Core MVC app, enforcing owner-only deletion with unit of work and video repository, and respond with JSON 200 or 404 on outcome.
Implement interactive sorting for my videos: toggle title and date order with up/down arrows, update header spans, and support pagination of the video list.
Create a responsive home page that hides the login message when authenticated, uses a sidebar on large screens and a top navbar on small screens, and highlights active pages.
Implement a home partial view in a .NET Core MVC app with a home VM, a category dropdown populated via unit of work, and pass the model from index.
Implement pagination on the home page using home parameters from base parameters. Project video data into a home grid DTO and return paginated results via CreateAsync in the video repository.
Adjusts the responsive navigation to display a hamburger on small screens, and uses a JavaScript module to fetch home videos via AJAX from the home grid API with pagination.
Implement frontend pagination, category filtering, and search in a .NET Core MVC YouTube clone by wiring cshtml and home.js to fetch videos with the get my videos function.
Implement a global timeago js function and a views formatter on the home page of the .NET Core MVC YouTube clone to display relative dates and view counts.
Create a migration to add a video file table, move content type and contents from video, add extension, and enforce a 1-to-1 video file relationship with cascade delete.
Define the IVideoFileRepo interface and implement VideoFileRepo, deriving from the base repo with the video file type and wiring it into the unit of work.
Fetch video data asynchronously, map it to a video watch VM, and stream video files via a GetVideoFile endpoint in a .NET Core MVC app.
Build a watch page with like/dislike buttons, time ago and view formatting, and implement download video via a post form using unit of work and video repo.
Explain how to implement a subscribe/unsubscribe toggle in a YouTube clone built with .NET Core MVC by exposing an http put api endpoint and updating channel subscribers via ajax.
Implement the like and dislike api endpoint for videos, updating the video's like dislikes, checking user id, and returning client commands for frontend actions.
Learn to implement client-side like/dislike functionality for a YouTube clone by making ajax calls to a video controller, toggling button states, and updating counts and subscriber numbers.
derive the comment and video view entities from a base entity, give them their primary keys, and use app user id and video id as foreign keys in a migration.
Add a comment feature to the video watch page using a dedicated comment view model, posting and displaying comments, and rendering via a Razor partial view.
Illustrates posting a comment in a .NET Core MVC app: fetch the video, create and save the comment via unit of work, and render updates in the watch page.
Display and enrich comments by injecting app user data, showing names and optional channel links, and rendering a dynamic available comments list in a comment partial.
Apply IP2Location API to enrich video views by retrieving city, region, postal code, and country from a viewer's IP address, and visualize the most viewed locations in analytics.
Implement video view tracking with an EF context, fetch the latest view by order by descending, and update last visit and visits after one hour or after a new day.
Add watchers to the watch.chtml view by including viewers, summing video visits, and displaying per-video viewer counts; implement conditional channel links and commit changes to GitHub.
In this comprehensive course, you will master .NET Core MVC by building a fully functional YouTube clone from the ground up. Whether you're a beginner looking to learn the fundamentals or an experienced developer wanting to sharpen your skills, this course is designed to take you step-by-step through the entire process of building a modern, scalable web application.
What You’ll Learn:
Core Concepts of .NET Core MVC: Understand the Model-View-Controller architecture and how it applies to building dynamic web applications.
Authentication and Authorization: Implement secure user authentication and role-based authorization using Identity.
Video Management: Create a complete video management system, allowing users to upload, edit, and manage videos.
User Roles and Permissions: Learn how to handle different user roles (Admin, User) and permissions effectively.
Commenting and Likes: Build interactive features like video comments and a like/dislike system.
Subscriptions and Channels: Develop user subscriptions and channel functionalities to mirror the core features of YouTube.
Data Management with Entity Framework Core: Work with databases to store, retrieve, and manage data efficiently using Entity Framework Core.
Frontend Integration with Razor Views: Build dynamic and responsive views with Razor, HTML, CSS, and JavaScript.
RESTful APIs: Expose APIs for video streaming, subscriptions, and more to create a seamless web experience.
By the end of the course, you will have a fully functioning video-sharing platform and a deep understanding of .NET Core MVC development. Join this course to take your web development skills to the next level and build a real-world application from start to finish!