What is OutputCache policy in .NET 7+?
Simple meaning
Server-side caching of endpoint output with policies for duration and tags.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready .NET / C# questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
Server-side caching of endpoint output with policies for duration and tags.
Open the full page for Why, Steps, Example and Key takeaway.
Boxing wraps a value type in an object on the heap
Open the full page for Why, Steps, Example and Key takeaway.
string is immutable so each change may allocate a new string.
Open the full page for Why, Steps, Example and Key takeaway.
It lets you write asynchronous methods with await.
Open the full page for Why, Steps, Example and Key takeaway.
It flags possible nulls at compile time when nullable context is on.
Open the full page for Why, Steps, Example and Key takeaway.
First throws if the sequence is empty.
Open the full page for Why, Steps, Example and Key takeaway.
It projects each element to a sequence and flattens the results into one sequence.
Open the full page for Why, Steps, Example and Key takeaway.
Kestrel is the cross-platform web server built into ASP.NET Core.
Open the full page for Why, Steps, Example and Key takeaway.
Transient creates a new instance every injection.
Open the full page for Why, Steps, Example and Key takeaway.
It loads entities without change tracking, which is faster for read-only queries.
Open the full page for Why, Steps, Example and Key takeaway.
A migration is a versioned change to the database schema generated from the model.
Open the full page for Why, Steps, Example and Key takeaway.
Resolving services from a static container inside business code hides dependencies.
Open the full page for Why, Steps, Example and Key takeaway.
A fake is a working simplified implementation.
Open the full page for Why, Steps, Example and Key takeaway.
They let you write simple members with => instead of a block.
Open the full page for Why, Steps, Example and Key takeaway.
They return values from patterns cleanly and force exhaustive cases with warnings.
Open the full page for Why, Steps, Example and Key takeaway.
It streams async sequences with await foreach.
Open the full page for Why, Steps, Example and Key takeaway.
It avoids capturing the SynchronizationContext after await.
Open the full page for Why, Steps, Example and Key takeaway.
IQueryable can translate expressions to SQL via a provider.
Open the full page for Why, Steps, Example and Key takeaway.
I use Results.Problem or validation ProblemDetails for consistent error JSON.
Open the full page for Why, Steps, Example and Key takeaway.
It selects the endpoint first, then runs middleware that can see the chosen route.
Open the full page for Why, Steps, Example and Key takeaway.