Cheat sheet · Build products
.NET developer cheat sheet (Full stack with Angular)
Opens with creditsA quick-revision companion to the .NET roadmap for full stack work with Angular: modern C#, ASP.NET Core, EF Core, auth, calling your API from Angular, testing and shipping. The last chapter is a production checklist with the Program.cs code for each item.
Chapters
10 chapters · 79 concepts
1C# syntax you use every dayThe parts of modern C# that show up in every ASP.NET Core codebase. C# 14 ships with .NET 10; most of what is here works from C# 9 onwards.9 concepts
- 1Value types and reference typesA struct (int, decimal, DateTime, your own structs) is copied when you assign or pass it.
- 2RecordsA record is a type built for data: the compiler writes value equality, a readable ToString and, with positional syntax, an immutable constructor and properties.
- 3Pattern matching and switch expressionsPatterns test the shape of a value: its type, a constant, a range or its properties.
- 4Nullable reference typesWith
<Nullable>enable</Nullable>(on in every new template)stringmeans never null andstring?means may be null. - 5Primary constructorsSince C# 12, a class can declare constructor parameters next to its name.
- 6Collection expressionsSince C# 12,
[a, b, c]creates an array, List, Span or other collection, chosen by the target type. - 7Generics and constraintsGenerics let a class or method work with any type while staying type-safe:
List<Order>only holds orders. - 8Extension methods and extension membersAn extension method adds a method to a type you do not own, through a static class and a
thisparameter. - 9Exceptions, using and finallyCode throws an exception for a situation it cannot handle; the nearest matching
catchup the call stack handles it.
9 in this chapterOpen this chapter2LINQLanguage Integrated Query: one set of methods for filtering, shaping and grouping data, in memory or translated to SQL by EF Core.6 concepts
- 1Where, Select and OrderByLINQ methods chain together:
Wherefilters,Selectshapes each item into something new,OrderByandThenBysort,TakeandSkippage. - 2Deferred executionA LINQ query does nothing when you write it.
- 3GroupBy and aggregates
GroupBybuckets items by a key;Sum,Count,Average,MinandMaxreduce a sequence or each group to one value. - 4First, Single and the OrDefault versions
Firsttakes the first match and throws if there is none. - 5IEnumerable vs IQueryable
IEnumerableruns LINQ in memory with C# delegates. - 6Choosing a collection
List<T>keeps order and allows duplicates.
6 in this chapterOpen this chapter- 1Where, Select and OrderByLINQ methods chain together:
- async, await and TasksHow .NET waits for databases and HTTP calls without blocking threads. ASP.NET Core is async from top to bottom, so these rules apply to every endpoint.6 conceptsOpens with credits
- The dotnet CLI and the platformWhat you install, how projects are created and built, and which .NET version to target. Everything here works the same on Windows, macOS and Linux.7 conceptsOpens with credits
- Dependency injection and configurationHow ASP.NET Core creates your services and hands them their settings. Lifetimes are the part that causes real production bugs.7 conceptsOpens with credits
- Middleware pipeline, routing and endpointsEvery request passes through a chain of middleware before it reaches an endpoint. Order matters, and most "it works locally but not in production" bugs start here.8 conceptsOpens with credits
- EF Core commands and pitfallsEntity Framework Core maps C# classes to tables and LINQ to SQL. It is fast to start with and easy to make slow, so the pitfalls matter as much as the commands.10 conceptsOpens with credits
- Auth, security and the front endWho the caller is, what they may do, and how a browser front end or another client talks to your API safely.6 conceptsOpens with credits
- Testing, shipping and background workHow .NET teams prove code works, package it, deploy it to Azure and run work outside the request.10 conceptsOpens with credits
- Production checklistTen things a production ASP.NET Core API needs, each with the Program.cs code to add it. The .NET version each feature arrived in is noted; all of it works on .NET 10.10 conceptsOpens with credits
- 11Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.140 terms
About this sheet
C#, ASP.NET Core, EF Core, production-ready APIs.
Related on Sefism
Picked from the other libraries by shared topics.
Roadmaps
See allBest practices
See all- TypeScript Best PracticesModern TypeScript best practices for 2026: strict settings, TypeScript 7, modeling data with unions, safe narrowing, runtime validation, generics and typed linting.
- Spring Boot Best PracticesBuild Spring Boot 4 services that are easy to change and safe to run: injection, configuration, REST layer, JPA, virtual threads, Actuator, tests and shutdown.
- ASP.NET Core Best PracticesBuild fast, safe ASP.NET Core 10 APIs: DI lifetimes, validated options, minimal APIs, problem details, async rules, EF Core, rate limits, tests and health checks.
Checklists
See all- Production Readiness ChecklistCheck a service before it takes real traffic: ownership, SLOs, capacity, timeouts and retries, alerts, rollout and rollback, backups, security and on-call.
- API Security ChecklistCheck your REST or GraphQL API against the OWASP API Security Top 10: authentication, object authorization, rate limits, input validation, SSRF, CORS and logging.
- Database Migration ChecklistCheck a schema or data migration before it ships: expand and contract, lock behaviour, online indexes, batched backfills, rehearsal on real data, backups, rollback, deploy order and monitoring.
Project structures
See all- Express with TypeScript project structureFor students who know a bit of JavaScript and want a backend that looks like the ones teams actually run. Express gives you almost no structure, so this layout supplies it: one folder per feature under src/modules, each split into routes, controller, service and repository, with Zod at the edge and Vitest plus Supertest for tests.
- NestJS project structureFor people who want a structured TypeScript backend with clear rules about where code goes. Every feature is a Nest module that owns its controller, service, DTOs, entities and tests, so the app grows by adding folders, not by stretching old ones. The tree follows one orders API from nest new to a codebase a whole team can run for years.
- FastAPI project structureA typed Python API for an orders app, built the way the FastAPI docs and the official full stack template lay it out: one
apppackage, a router per feature, Pydantic schemas at the edges, services in the middle and SQLAlchemy models with Alembic migrations underneath. For students who have finished the FastAPI tutorial and want to know where the second, tenth and fiftieth file go.
Career questions
See all- Should I use PostgreSQL or MongoDB for my project?For most student and startup projects, PostgreSQL is the safer default: relational data, joins, constraints and transactions fit most apps, and it handles JSON and vector search too. MongoDB is a good fit when your data is naturally document-shaped and varies a lot, or your team already knows it well. Model your data first, then choose.
- How do I choose between frontend, backend, mobile, cloud, cybersecurity, data and AI without trying them all for years?Do not try to pick the best field; pick the one whose daily problems you can tolerate on a bad day. Run a short, cheap experiment in two or three candidates, compare what you enjoyed doing rather than what sounded exciting, check the local job market, and commit for six to nine months.
- Should I use Firebase or Supabase for my app?Both let you ship an app fast with auth, a database, storage and hosting-style services. Supabase is built on PostgreSQL, so it suits relational data and SQL skills you will reuse anywhere. Firebase is a mature Google platform with a document database and strong mobile tooling. Choose by your data shape, your platform, and how much you want to learn transferable database skills.
Work with me
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com