Set request body limits intentionally
Choose global and endpoint-specific request body limits instead of inheriting accidental defaults for uploads and APIs.
Choose global and endpoint-specific request body limits instead of inheriting accidental defaults for uploads and APIs.
How Microsoft.Extensions.AI keeps provider SDKs at the edge of .NET applications through shared abstractions, dependency injection, and middleware.
Keep uploads quarantined until required metadata, content, and resource checks succeed, while treating client filenames as untrusted.
Use MultipartReader when buffered ASP.NET Core uploads put too much pressure on memory, temporary-disk capacity, or disk I/O.
Use async to avoid blocking while I/O is in flight, and treat CPU parallelism as a separate measured design decision.
Give retrieval its own outcome and telemetry so missing or irrelevant context is not diagnosed as a model problem.
Use Select to project only the required values before ToListAsync, reducing transferred columns and unnecessary entity materialization on EF Core read paths.
Give AI tools precise parameter names, units, formats, and side-effect expectations so the model receives an unambiguous contract.
Use explicit request and response contracts so persistence fields and domain state do not become part of the public API accidentally.
How to host a Microsoft Agent Framework agent in Foundry while keeping authorization, conversation ownership, identity, and governance boundaries explicit.