abstract class | abstract class (TypeScript) | TypeScript supports abstract natively. JS has no runtime enforcement — TS provides compile-time only. |
| Action / Func delegate | Function type literal / arrow function | (x: number) => string is the TS equivalent of Func<int, string>. |
| ActionResult / IActionResult | Response (Web API) / return value + status code (NestJS) | In NestJS, return the object and decorate with @HttpCode(). In Next.js, use NextResponse. |
| ADO.NET | pg / mysql2 / better-sqlite3 | Low-level database driver packages. Equivalent raw SQL access layer. |
| API Controller | NestJS @Controller / Next.js Route Handler | NestJS uses class-based controllers. Next.js uses file-based route.ts exports. |
| appsettings.json | .env / environment variables | dotenv loads .env files. Use zod or t3-env to validate and type env vars. |
| ASP.NET Core | Express / Fastify / NestJS / Next.js | Express is the closest analog. NestJS is the opinionated full-framework equivalent. |
| Assembly | npm package / ES module | The unit of distribution. Published via npm registry. |
| async / await | async / await | Identical syntax. JS async is single-threaded; no thread pool parallelism. Use Promise.all() for concurrency. |
| Attribute (C#) | Decorator (@) | TypeScript decorators are Stage 3. NestJS relies on them heavily. Behavior differs from C# attributes. |
| AutoMapper | zod.transform() / plain mapping functions / ts-belt | No dominant library equivalent. Manual mapping functions or Zod schema transforms are idiomatic. |
| Background service / IHostedService | Worker threads / BullMQ / setInterval | BullMQ (Redis-backed queues) is the production equivalent for background jobs. |
| BCrypt.Net | bcrypt / argon2 npm packages | bcryptjs is pure JS. argon2 is preferred for new systems. |
| Blazor | React / Vue / Svelte | Blazor (WASM) has no direct JS equivalent — it replaces JS with C#. React is the most comparable component model. |
| Build configuration (Debug/Release) | NODE_ENV (development/production) | Set via environment variable. Bundlers (Vite, webpack) tree-shake based on this value. |
| Builder pattern | Method chaining / fluent APIs | Common in JS. Example: query.where(...).orderBy(...).limit(...) in Drizzle ORM. |
| Cancellation token | AbortController / AbortSignal | AbortController.signal is passed to fetch() and async operations for cancellation. |
| CQRS pattern | CQRS libraries / manual command/query separation | No dominant library. Nest has community CQRS module (@nestjs/cqrs). Often implemented manually. |
| Class library project | npm package (local or published) | A workspace package in a pnpm monorepo is the direct analog of a referenced class library. |
| ClaimsPrincipal / Claims | JWT payload / session object | Claims live in the JWT payload or session store. Clerk, Auth.js expose typed user objects. |
| Code-first migrations | Prisma Migrate / Drizzle Kit push/generate | Both tools generate SQL migration files from the schema definition. |
| ConfigureServices (Startup) | Module providers (NestJS) / middleware config (Express) | NestJS @Module({ providers: [] }) is the DI registration point. |
| Connection string | DATABASE_URL environment variable | Convention in the JS ecosystem. Prisma, Drizzle, and most ORMs read from DATABASE_URL. |
| Console application | Node.js CLI script / tsx entrypoint | Run with node dist/index.js or tsx src/index.ts for ts-node style execution. |
| Controller (MVC) | NestJS @Controller / Next.js Route Handler / Express router | Depends on framework. NestJS is the most direct analog for class-based MVC. |
| CORS middleware | cors npm package / built-in framework option | app.use(cors({ origin: '...' })) in Express. NestJS has app.enableCors(). |
| DateTime / DateTimeOffset | Date / Temporal (Stage 3) / dayjs / date-fns | JS Date is mutable and has quirks. date-fns or dayjs are standard libraries. Temporal is the modern replacement. |
| DbContext (EF Core) | Prisma Client / Drizzle ORM instance | The singleton database access object. Prisma Client is the direct analog. |
DbSet<T> | Prisma model accessor (prisma.user) / Drizzle table object | prisma.user.findMany() maps to dbContext.Users.ToList(). |
| Decorator pattern | Higher-order functions / HOCs / class decorators | HOFs are idiomatic in JS. Class-based decorators exist in TS/NestJS. |
| Dependency Injection (DI) | NestJS DI container / manual constructor injection | NestJS has a full DI system. In plain Node/React, use module imports or React Context. |
| Dictionary<K,V> | Map<K, V> / plain object Record<K, V> | Map is the closest structural equivalent. Plain objects work for string keys. |
| dotnet CLI | npm / pnpm / nest CLI / gh CLI | See Appendix D for full command mapping. |
| dotnet ef (EF Core tools) | prisma CLI / drizzle-kit CLI | prisma migrate dev, drizzle-kit generate are the equivalent migration commands. |
| dotnet publish | npm run build / tsc / Vite build | Produces optimized output. For servers: tsc --outDir dist. For frontends: vite build. |
| dotnet restore | pnpm install | Restores/installs all declared dependencies. |
| dotnet run | pnpm dev / tsx src/index.ts | Starts the dev server with hot reload. tsx --watch for Node scripts. |
| dotnet test | pnpm test / vitest run / jest | Runs the test suite. Vitest is the modern standard. |
| dotnet watch | nodemon / tsx --watch / vite dev server | File watchers that restart on change. Vite’s HMR is near-instant. |
| DTOs (Data Transfer Objects) | Zod schemas / TypeScript interfaces | Zod schemas validate at runtime and infer TS types. Interfaces are compile-time only. |
| Entity Framework Core | Prisma / Drizzle ORM / TypeORM | Prisma is the most popular. Drizzle is the lightweight, type-safe SQL alternative. |
| Enum | const enum / string union / enum (TS) | Prefer string unions (`‘admin’ |
| Environment (Development/Production) | NODE_ENV | Set at process start. process.env.NODE_ENV === 'production'. |
| Event sourcing | EventStoreDB / custom event log in PostgreSQL | No dominant npm library. Community patterns exist using Postgres or Redis Streams. |
| Exception | Error / custom error subclass | throw new Error('message'). Custom errors: class NotFoundError extends Error {}. |
| Exception filter | Express error middleware / NestJS exception filter | Express: app.use((err, req, res, next) => {}). NestJS: @Catch() decorator. |
| Extension method | Module-level function / prototype extension (avoid) | Idiomatic TS uses standalone utility functions. Prototype extension is discouraged. |
| FluentValidation | Zod / Yup / Valibot | Zod is dominant. Provides schema definition, parsing, and typed error messages. |
| Garbage Collector | V8 Garbage Collector | Automatic. No manual control. Avoid memory leaks in closures and event listeners. |
Generic type T | Generic type parameter <T> | Identical syntax. TS generics are compile-time only; erased at runtime. |
| Guid / Guid.NewGuid() | crypto.randomUUID() / uuid npm package | crypto.randomUUID() is built into Node 19+. uuid package for older environments. |
| HttpClient | fetch / axios / ky | fetch is built into Node 18+. axios remains popular. ky is a modern wrapper. |
| HttpContext | Request / Response objects | Express: req, res. Next.js: NextRequest, NextResponse. NestJS: injected via @Req(). |
| IConfiguration | process.env / t3-env / dotenv | Environment variable access. t3-env adds Zod validation and TypeScript types. |
IEnumerable<T> | Iterable<T> / Array<T> / generator function | Arrays are most common. Generators (function*) produce lazy iterables. |
| IHostBuilder | NestJS NestFactory.create() / Express app init | The application bootstrap entry point. |
| ILogger / logging | pino / winston / consola | pino is the highest-performance structured logger. consola for CLIs. |
| IMiddleware / middleware pipeline | Express middleware chain / NestJS middleware | app.use(fn) in Express. NestJS has middleware, guards, interceptors, and pipes. |
IOptions<T> | Typed env config via t3-env or Zod | No built-in options pattern. t3-env provides the closest typed config experience. |
IQueryable<T> | Prisma query builder / Drizzle query builder | Lazy, chainable query builders. Not executed until awaited. |
| IServiceCollection | NestJS @Module({ providers }) | DI registration. NestJS modules declare what is injectable. |
| IServiceScope | NestJS request-scoped providers | @Injectable({ scope: Scope.REQUEST }) creates a per-request provider instance. |
| Integration test | Supertest + Vitest / Playwright API tests | supertest sends HTTP requests to an Express/NestJS app in tests. |
| Interface | TypeScript interface / type alias | TS interfaces are structural (duck typing). No runtime existence — compile-time only. |
| JWT (System.IdentityModel) | jose / jsonwebtoken npm package | jose is the modern, Web Crypto-based library. jsonwebtoken is legacy but widely used. |
| LINQ | Array methods + Lodash / native array methods | map, filter, reduce, find, some, every, flatMap. Lodash adds groupBy, orderBy, etc. |
LINQ GroupBy | Array.prototype.reduce / lodash.groupBy / Map | No single built-in. Object.groupBy() landed in Node 21+ / ES2024. |
LINQ Select | Array.prototype.map() | Direct equivalent. |
LINQ Where | Array.prototype.filter() | Direct equivalent. |
LINQ FirstOrDefault | Array.prototype.find() | Returns undefined instead of null/default. |
LINQ OrderBy | Array.prototype.sort() / lodash.orderBy | Native sort mutates in place. Use [...arr].sort() to avoid mutation. |
List<T> | Array<T> | JS arrays are dynamic by default. No fixed-size array type. |
| Mediator pattern | @nestjs/cqrs / custom event emitter | EventEmitter in Node for basic pub/sub. NestJS CQRS module for formal mediator. |
| Memory cache | lru-cache npm package / Redis | In-process cache: lru-cache. Distributed cache: Redis (via ioredis). |
| Middleware | Express middleware / NestJS middleware, guards, interceptors | Express middleware is a function (req, res, next) => void. |
| Migration (EF Core) | prisma migrate dev / drizzle-kit generate | Both generate SQL files tracked in source control. |
| Model binding | Request body parsing / Zod parsing | express.json() middleware parses JSON body. Zod validates and types the result. |
| Model validation | Zod / class-validator (NestJS) | NestJS uses ValidationPipe + class-validator decorators for DTO validation. |
| MSTest / xUnit / NUnit | Vitest / Jest | Vitest is the modern standard. API is compatible with Jest. |
| Namespace | ES module (import/export) | No direct equivalent. Modules replace namespaces. TypeScript namespace exists but is discouraged. |
| NuGet | npm registry | Package registry. pnpm add <package> installs from npm. |
| NuGet package reference | package.json dependencies | Declared in package.json. pnpm install resolves and installs. |
Object initializer new Foo { Bar = 1 } | Object literal { bar: 1 } / spread | TS uses plain object literals. Constructor call then property assignment is uncommon. |
| ORM | Prisma / Drizzle / TypeORM / MikroORM | Prisma and Drizzle are the modern choices. TypeORM is the legacy ActiveRecord-style option. |
| Pagination (manual) | Cursor-based or offset pagination via ORM | Prisma: take/skip for offset. cursor for keyset pagination. |
Pattern matching (switch) | switch / discriminated unions / match (ts-pattern) | ts-pattern library provides exhaustive pattern matching similar to C# switch expressions. |
| Polly (resilience) | axios-retry / p-retry / cockatiel | cockatiel is the most feature-complete resilience library (circuit breaker, retry, timeout). |
readonly | readonly (TS) / as const | TS readonly on properties. as const freezes object types to literals. |
Record<string, T> | Record<string, T> | Identical. TS has the same Record utility type. |
| Reflection | No direct equivalent | JS has no runtime type metadata by default. reflect-metadata polyfill used by NestJS/TypeORM. |
| Repository pattern | Service class / Prisma repository pattern | Often implemented as a service wrapping Prisma calls. No enforced interface. |
| Response caching | HTTP cache headers / Cache-Control / Redis | Set Cache-Control headers. Next.js has built-in fetch caching. Redis for server-side response cache. |
| RouteAttribute / routing | Express app.get('/path', handler) / Next.js file-based routing | NestJS: @Get(':id'). Next.js: file system routing (app/users/[id]/route.ts). |
| Scaffold | nest generate / shadcn/ui CLI / create-next-app | Code generators. nest g resource scaffolds a full CRUD module. |
| Sealed class | final class (TS 5.x not yet) / discriminated union | No native sealed in TS. Discriminated unions prevent unintended extension at the type level. |
| Secret Manager | .env files / cloud secret stores (Doppler, Vault) | Never commit .env with secrets. Use GitHub Actions secrets or Doppler for CI/CD. |
| Serilog / structured logging | pino / winston | pino outputs JSON structured logs by default. Use pino-pretty for dev formatting. |
| SignalR | Socket.IO / WebSockets (ws) / Server-Sent Events | Socket.IO is the closest analog. Native WebSocket API available in Node 22+. |
| Singleton lifetime | Module-level singleton / NestJS default scope | In NestJS, providers are singleton by default. In Node, module exports are cached singletons. |
| Solution file (.sln) | pnpm workspace (pnpm-workspace.yaml) | Groups multiple projects. pnpm workspaces replace the solution file concept. |
| static class | Plain module (.ts file) | A TS module with exported functions is the idiomatic static class replacement. |
String interpolation $"..." | Template literal `${value}` | Identical concept, different syntax. |
| Swagger / OpenAPI | @nestjs/swagger / zod-openapi / swagger-ui-express | NestJS has first-class Swagger support. Zod schemas can generate OpenAPI specs. |
Task<T> | Promise<T> | Direct equivalent. async functions return Promise. No ValueTask equivalent. |
| Thread / ThreadPool | Worker threads (worker_threads module) | Node is single-threaded by default. CPU-bound work offloaded to Worker threads. |
| try/catch/finally | try/catch/finally | Identical syntax. Async errors require await inside try blocks. |
| Transient lifetime | Scope.TRANSIENT (NestJS) | @Injectable({ scope: Scope.TRANSIENT }) creates a new instance per injection. |
Tuple (int, string) | Tuple [number, string] (TS) | TS tuples are typed array literals. Used heavily in React hooks (useState returns a tuple). |
| Type inference | Type inference | TS infers types from assignments and return values. Explicit annotation often unnecessary. |
| Unit test | Vitest test / Jest test | describe / it / expect API. Vitest is Vite-native and faster than Jest. |
using statement (IDisposable) | try/finally / using declaration (TC39 Stage 3) | JS Stage 3 using keyword mirrors C#. Until stable, use try/finally or explicit .close(). |
var / implicit typing | const / let (TS infers) | Prefer const. TS infers type from initializer. var exists in JS but is avoided. |
| ValueObject pattern | Branded types / z.brand() in Zod | Zod .brand() creates nominal types. Branded types add type-level identity without runtime cost. |
| Vertical slice architecture | Feature-folder structure in NestJS / Next.js | Organizing code by feature (/users/users.controller.ts, /users/users.service.ts) rather than by layer. |
| View / Razor Page | React component / Vue SFC / Next.js page | .tsx / .vue files are the view layer. Server components in Next.js 13+ blend view and data. |
| ViewBag / ViewData | Props / component state / query params | Data passed to components via props in React/Vue. No global ViewBag concept. |
| Web API project | NestJS application / Next.js API routes | NestJS is the full-framework equivalent. Next.js app/api/ for lighter API routes. |
xUnit [Fact] / [Theory] | Vitest it() / it.each() | it.each([...]) is the parameterized test equivalent of [Theory] + [InlineData]. |