Blog
Para quem já sabe o básico e quer ir fundo. Aqui o assunto é como os modelos funcionam em produção: memória, roteamento, ferramentas, agentes. O lado técnico que pouca gente explica direito.
C# nasceu em 2000 (Anders Hejlsberg, Microsoft) com .NET Framework. Versões marcantes: C# 2 (generics), 3 (LINQ), 5 (async/await pioneiro), 8 (nullable reference types), 10 (record struct), 12 (primary constructors). Compilador Roslyn gera IL que roda na CLR; AOT em .NET 8+ gera binário nativo. Diferencial: ecossistema Microsoft completo (Azure, Visual Studio), async/await como cidadão primeiro nível, LINQ, span<T>, produtividade insana. Mercado 2026: enterprise backend (bancos, seguradoras), Unity game dev, AI integrações (Semantic Kernel), desktop (WinUI 3, MAUI). .NET 8 LTS é o padrão em produção; .NET 9 STS para novos greenfield.
Records (immutable value types), pattern matching exaustivo, primary constructors (C# 12), collection expressions, required properties, file-scoped namespaces. C# moderno parece uma linguagem diferente de C# 5.
Task vs Task<T>, await ≠ wait, ConfigureAwait(false) em libs, cancellation token obrigatório, ValueTask pra hot paths, IAsyncEnumerable (C# 8+) pra streams, async void só em event handlers.
Method syntax (mais usado) vs query. IEnumerable vs IQueryable (LINQ-to-SQL). Deferred execution (lazy vs .ToList/.ToArray), aggregation (Sum, GroupBy), performance gotchas (N+1 evitável com Include).
Minimal APIs (.NET 6+), route handlers direct, dependency injection built-in, OpenAPI/Swagger auto, authentication & authorization, health checks, rate limiting middleware. Zero boilerplate vs Controllers clássico.
DbContext scoped lifetime, migrations (add/update/script), tracking vs no-tracking (.AsNoTracking), eager loading (.Include), compiled queries, bulk operations (EF Core 7+), raw SQL quando preciso.
Span<T> (stack-only, ref struct) — zero allocation slices. Memory<T> (heap-ok, async-compatible). stackalloc, ArrayPool, ValueTask, ref returns. Performance-critical code moderno C#.
CLR (Common Language Runtime), GC generational (gen 0/1/2 + LOH), Native AOT (.NET 7+), Ready2Run. Self-contained vs framework-dependent deploy. Docker images. Blazor overview. MAUI overview.
API real: Minimal APIs + EF Core + Serilog + OpenAPI + Auth JWT + rate limiting + health checks + Dockerfile + tests (xUnit + TestContainers). Deploy em Azure App Service ou container.