📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

REST

REST principles, resources and URI design, CRUD mapping, idempotency and safe methods, HATEOAS and the Richardson maturity model, and choosing an API style.

  1. What is REST? Explain Fielding's architectural constraints (client-server, statelessness, cacheability, uniform interface, layered system, code on demand), what the uniform interface really requires, and what people mean in practice when they call an API "RESTful".

    REST as an architectural style: Fielding's six constraints, the four parts of the uniform interface, and the gap between academic REST and the pragmatic "RESTful" JSON-over-HTTP APIs most teams build.

    Junior Theory REST Β· πŸ”— 2 follow-ups
  2. How do you map CRUD operations onto HTTP? When should a create be a POST to a collection and when a PUT to a known URI, how do you implement an upsert with PUT, and what is the difference between a collection resource and an item resource?

    Mapping create, read, update and delete to HTTP methods and status codes: POST to a collection vs PUT to an item, upsert semantics, collection vs item resources, and the responses each should return.

    Junior Theory REST Β· πŸ”— 3 follow-ups
  3. How do you design resource URIs for a REST API? Explain nouns vs verbs, plural collection names, how deep to nest sub-resources, when to use a sub-resource vs a top-level resource with a filter, and the naming conventions (casing, ids, trailing slashes, file extensions) you would standardise on.

    URI design for REST APIs: noun-based plural collections, nesting depth and sub-resources, top-level resources with filters, identifiers, casing and other conventions worth standardising across an API.

    Intermediate Theory REST Β· πŸ”— 2 follow-ups
  4. What do safety and idempotency mean for a REST API in practice? Why do clients, gateways and resilience handlers depend on them when retrying, how do you test that an endpoint really is idempotent, and what design options do you have when an operation must be retryable but isn't naturally idempotent?

    Safety and idempotency as a retry contract: why every layer that retries depends on them, idempotency as effect on state, testing it, and the design options (PUT with client ids, conditional requests, idempotency keys, natural dedup) for retry-safe writes.

    Intermediate Theory REST Β· πŸ”— 3 follow-ups
  5. What is HATEOAS, and what are the levels of the Richardson maturity model? Walk through levels 0 to 3 with examples, explain what hypermedia buys a client, whether anyone really uses it in production, and what pragmatic stance you would take for a .NET API.

    Hypermedia as the engine of application state and the Richardson maturity model levels 0-3, with examples, the real benefits and costs of hypermedia, where it is used (HAL, JSON:API, Siren, Microsoft Graph nextLink), and a pragmatic stance for ASP.NET Core APIs.

    Mid-Level Theory REST Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  6. How do you choose between REST, gRPC, GraphQL and asynchronous messaging for an API? Compare them on contract, performance, browser and tooling support, caching, coupling and failure handling, and give examples of where each fits in a .NET system on Azure.

    Choosing an API style: REST over HTTP, gRPC, GraphQL and asynchronous messaging compared on contracts, performance, client support, caching, coupling and failure semantics, with typical placements in a .NET 10 system on Azure.

    Mid-Level Theory REST Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  7. How do you model operations that aren't simple CRUD in a REST API? Compare POST /orders/{id}/cancel, a cancellation sub-resource and PATCH on a status field for state transitions, and show how you implement a long-running operation in ASP.NET Core with 202 Accepted, a status resource, Retry-After and a final result.

    Modelling non-CRUD operations: state transitions as action endpoints, sub-resources or PATCH, and the asynchronous request-reply pattern (202 Accepted, Location/Operation-Location, status resource, Retry-After, result link) implemented in ASP.NET Core 10 with a background worker.

    Mid-Level Coding REST Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  8. You're asked to design a public REST API that external partners will integrate with for years. How do you approach the resource model, naming and consistency, versioning and evolution, errors, pagination, security, documentation and SDKs, and which published guidelines (such as Microsoft's REST API guidelines) would you base your standards on?

    Designing a long-lived partner-facing REST API: domain-driven resource model, consistent conventions, a guideline baseline (Azure / Microsoft Graph REST API guidelines, Google AIP, Zalando), evolution and versioning policy, errors, paging, security, and the documentation and SDK experience, on ASP.NET Core 10 and Azure API Management.

    Senior Architecture REST Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me