Welcome to this GitHub repository focused on the basics of ASP.NET Core using C# and the MVC design pattern.
- ASP.NET Core is a free and open-source framework developed by Microsoft.
- It's a modern, cloud-based, internet-connected application framework.
- Allows developers to build web apps, RESTful APIs, and mobile backends.
- C# (pronounced "C Sharp") is a modern object-oriented programming language.
- It's part of the .NET family and is designed for building Windows applications.
- MVC stands for Model-View-Controller.
- It's a design pattern that separates an application into three interconnected components:
- Model: Handles data and business logic.
- View: Displays the user interface and visuals.
- Controller: Manages user inputs and interacts between Model and View.
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
}
public class Student
{
public int Id { get; set; }
public string Name { get; set; }
public int Age { get; set; }
}
@model Student
<h2>@Model.Name's Profile</h2>
<p>Age: @Model.Age</p>
Install the latest .NET SDK
dotnet new mvc -n YourProjectName
cd YourProjectName
dotnet run