Skip to main content
Advertisement

.NET and ASP.NET

Learn about the .NET ecosystem that extends the power of C# to the web and systems overall.

1. What is .NET?

An open-source development platform developed by Microsoft. You can build apps in various environments such as desktop, web, mobile, and cloud.

  • Cross-Platform: Runs on Windows, macOS, and Linux.
  • High Performance: Boasts very fast speeds in modern technologies like gRPC and JSON serialization.
  • Unified: With the integration into .NET 5/6/7/8, past complex naming conventions have been consolidated.

2. ASP.NET Core (Web Framework)

A framework for building high-performance web servers with C#.

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/", () => "Hello, .NET Core!");

app.Run();

3. Web API and Controllers

Specialized in creating modern RESTful API servers.

[ApiController]
[Route("[controller]")]
public class UsersController : ControllerBase
{
[HttpGet]
public IEnumerable<User> Get()
{
return _userService.GetAll();
}
}

4. Entity Framework Core (ORM)

Allows for convenient database handling using C# code.

public class MyDbContext : DbContext
{
public DbSet<User> Users { get; set; }
}

.NET is widely used, especially for developing large-scale enterprise systems and high-performance game servers (Unity).

Advertisement