بــــرمـــجـــــة وتــــطــــويــــــر واجـهـــات الـــويــــب الـخــلفية
BACK-END Web Development
40 ساعة
40 ساعة
Course Overview:
This course provides a complete introduction to back-end web development using C# and ASP.NET Core. Students will start by learning C# programming fundamentals, then advance to building modern web applications with ASP.NET Core MVC, routing, middleware, and data access using Entity Framework. The program concludes with RESTful API development, focusing on clean architecture, database integration, and secure data handling — preparing learners to build scalable and professional back-end solutions for real-world projects.
Learning Objectives:
By the end of this course, students will be able to:
Write, structure, and debug C# programs, applying core programming principles and object-oriented concepts.
Build ASP.NET Core web applications using MVC, routing, middleware, and dependency injection.
Implement database connectivity with Entity Framework Core to perform CRUD operations and manage data effectively.
Design, implement, and deploy RESTful APIs using ASP.NET Core, applying best practices in security, validation, and scalability.
Use DTOs, AutoMapper, and services to organize business logic and ensure clean architecture.
Apply problem-solving techniques and industry standards to deliver real-world back-end web applications.
What You Will Learn:
Part 1: C# Basics
Home
Overview
Environment
Program Structure
Basic Syntax
Data Types
Type Conversion
Variables
Constants
Operators
Decision Making
Loops
Encapsulation
Methods
Nullables
Arrays
Strings
Structure
Enums
Classes
Inheritance
Polymorphism
Operator Overloading
Interfaces
Namespaces
Preprocessor Directives
Regular Expressions
Exception Handling
File I/O
Part 2: ASP.NET Core Development
Overview of ASP.NET Core
ASP.NET Core is a high-performance, cloud-enabled, cross-platform, open-source framework to build a modern, Internet-connected apps.
Many applications can be made using ASP.NET Core, Such as:
Internet of Things (IoT) apps, services and web apps, and mobile backends.
Development tools on macOS, Windows, and Linux.
The cloud apps or on-premises.
Why choose ASP.NET Core?
Millions of developers use ASP.NET 4.x to create a different web apps.
ASP.NET Core is a redesign of ASP.NET 4.x that contains architectural changes that result in a leaner. ASP.NET Core provides many benefits, such as:
A unified story used to build web APIs and web UI.
Architected for testability.
Razor Pages makes coding page focused scenarios and more productive and easier.
Blazor use C# in the browser alongside JavaScript. Share clientside and server-side app logic all written with .NET.
Integration of modern, development workflows and client-side frameworks.
Ability to run on macOS, Windows, and Linux.
Community-focused and Open-source.
A high-performance, lightweight, and modular HTTP request pipeline.
Ability to host on HTTP.sys, IIS, Nginx, Side by side versioning, Tooling used to simplifies a modern web development, Kestrel, Apache, and Docker.
A cloud-ready, environment-based configuration system.
Built-in dependency injection.
Overview of ASP.NET Web API
ASP.NET Web API is a framework used to makes it easy to build HTTP methods that reach a broad range of clients, including mobile devices and browsers.
ASP.NET Web API is an ideal platform to build RESTful applications on the .NET Framework
Introduction and Environment Setup
1. Introduction to ASP.NET Core Web API
2. Fundamental REST API Development Principles
3. What is the need for Web API?
4. What is Web API and which framework should we use for the development
5. What are REST and RESTful Web APIs
6. List of all software required for Web API development
7. Install the Dot Net Core framework and verify the installation
8. Install the SQL Server
9. Install SQL Server Management Studio (SSMS)
10. Install Visual Studio 2022 Community Edition
11. Install and Explore PostMan
Project Setup and Configurations
1. Create ASP.NET Core API Project with Visual Studio
2. Create ASP.NET Core API Project with Visual Studio Code
3. Default Asp.Net Core Project Files
4. Explore ASP.NET Core Web API Project and Explore Swagger API
5. Testing the Web API Project with Postman and Swagger
6. .NET 6 vs Previous Versions
7. CORS Configuration
Fundamentals of HTTP, HTTP Verbs and Status Codes
1. What is HTTP and why do we need to know about HTTP?
2. HTTP Request and HTTP Response with its components
3. HTTP Verbs or HTTP methods
4. Status Code and their categories
5. Frequently used Status Codes in Web API
Middleware and HTTP Request Pipeline
1. What is Middleware and HTTP Request Pipeline
2. Working with Run(), Map(), Use() and Next() method
3. Demo: Run() method in Middleware
4. Demo: Use() & Next() method in Middleware
5. Demo: Map() method in middleware
6. Create Custom Middleware in a separate file
7. Verify the Next() method in built-in middleware
Controller Action Return Types
1. Introduction to Controller Action Return Types
2. Specific Type
3. IActionResult
4. ActionResult<Type>
5. Custom Return Type
6. Summary of Controller Action Return Types
Routing in Asp.Net Core Web API
1. What is Routing in Asp.Net Core Web API
2. How to Enable Routing in ASP.NET Core Web API
3. Set the first Route on Controller’s Action method
4. Working with Variables in Routing
5. Working with Query String in Routing
6. Setup multiple URLs for a single resource (Action Method)
7. Same URL for multiple resources (Is this Possible?)
8. Token replacement in Routing
9. Set the Base Route at the Controller level
10. Route Constraints: Validate the route variables
11. Route Constraints: Alpha & Regular Expression (regex)
12. Best practices of RESTful URLs for CRUD operations
Model Binder
1. What is Model Binder?
2. [BindProperty] attribute: Bind Incoming form-data to public properties
3. [BindProperties] attribute
4. Model binder’s default way to bind the incoming request data with parameters
5. [FromQuery] attribute: Bind the query string data
6. [FromRoute] attribute: Bind the route data
7. [FromBody] attribute: Bind the body data
8. [FromForm] attribute: Bind the from-data
9. [FromHeader] attribute: Bind the header data
10. Custom Model Binder in Asp.Net Core Web API
Database Modelling and Entity Framework
1. Setup Entity Framework in API Project
2. Introduction to Entity Framework Core
3. Install Entity Framework Core in Asp.Net Core Web API application
4. Setup the DbContext Class and Database Connection String
5. Read connection string from appsettings.json file
6. Generate SQL Server database using Entity Framework Core migrations
7. Implement Data Classes and Perform Migrations
8. Seed Data in Tables
Dependency Injection (DI)
1. What is Dependency Injection (DI)
2. Working with Services without using Dependency Injection
3. Singleton service lifetime using AddSingleton<> method
4. Scoped service lifetime using AddScoped<> method
5. Transient service lifetime using AddTransient<> method
6. TryAddSingleton, TryAddScoped and TryAddTransient methods in DI
Web API Logging and Serilog
1. Introduction to Logging
2. The What, Why, and How of Logging
3. Setting up Serilog in Web API
4. Logging to a file using Serilog
5. Adding a new Log table using EFCore migrations
6. Logging to an SQL Table using Serilog
7. Retrieving all logs from the database
8. Summary of Logging
Validations in ASP.NET Core Web API
1. Introduction To Fluent Validations
2. Setting Up Fluent Validations
3. Implementing Fluent Validations
Scaffolding API Functionality
1. Scaffolding Controllers and Actions
2. Test and Understand POST Endpoint
3. Test and Understand GET Endpoints
4. Test and Understand PUT Endpoint
5. Test and Understand DELETE Endpoint
Rest API Development Best Practices
1. Refactor POST Method with Data Transfer Object
2. Introduction to Automapper
3. Refactor GET Methods
4. Refactor PUT Method
5. Implement Repository Pattern
6. Refactor Controller to Use Repository
Security in API
Setup User Identity Core
Add Default User Roles
Setup Auth Manager for Registration
Setup Registration Endpoint
Setup Login Endpoint
Implement JWT Authentication
Protecting Endpoints
Implement Refresh Tokens
Refresh Token with Login
Entity Framework Core
Introduction to Entity Framework Core
How to Install Entity Framework Core
DbContext in Entity Framework Core