🖥️

ASP.NET Core Tutorial

Jun 19, 2024

ASP.NET Core Tutorial Notes

Course Overview

  • Instructor: Venket
  • Course Goal: Learn ASP.NET Core to build data-driven web applications
    • Perform CRUD operations (Create, Read, Update, Delete) using SQL Server
    • Develop a project from scratch

Topics Covered

  1. ASP.NET Core
  2. ASP.NET Core MVC
  3. ASP.NET Core Identity for Security
  4. Entity Framework Core for Data Access

What is ASP.NET Core?

  • ASP.NET Core: Cross-platform, high-performance, open-source framework for building modern cloud-based, internet-connected applications.
  • Redesign of ASP.NET: Originally called ASP.NET 5, renamed to ASP.NET Core 1.0

Benefits and Features

Cross-Platform Development

  • Can run on Windows, macOS, or Linux
  • Hosting Options
    • IIS, Apache, Docker, self-hosting
  • Development Tools
    • Visual Studio, Visual Studio Code, third-party editors (e.g., Sublime)

Unified Programming Model

  • Single model for MVC web applications and Web APIs
  • Controller Inheritance: Both MVC and Web API controllers inherit from Controller Base
  • IActionResult: Interface with multiple implementations (e.g., ViewResult, JsonResult)
  • MVC returns ViewResult, Web API returns JsonResult

Dependency Injection

  • Built-in support for dependency injection
  • Enhances testability
    • Simplifies unit testing for ASP.NET Core apps

Open Source and Community Focused

  • Actively developed by the .NET team and open source community
  • Continuous improvements and bug fixes
  • Result: More secure, higher quality software

Modularity

  • Uses middleware components for modularity
  • Middleware composes request and response pipelines
  • Built-in and custom middleware

Prerequisites

  • Basic knowledge of HTML, CSS, and C#
  • Prior MVC knowledge is helpful but not required

Next Steps

  • Identifying and installing tools to start building ASP.NET Core web applications