FlashKeepers

C# · College · College and University

ASP.NET Core and Entity Framework

ASP.NET Core middleware, minimal APIs, controllers, dependency injection, configuration, and Entity Framework Core migrations and queries.

About this set

41 basic cards for College C#. It opens with "What is ASP.NET Core middleware?" and "In what order does middleware execute?". Study it alongside the other College sets below.

41 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is ASP.NET Core middleware?
Show answerSoftware components that process HTTP requests and responses in a pipeline.
In what order does middleware execute?
Show answerIn the order registered in Program.cs, then returns in reverse order.
What method registers custom middleware in the pipeline?
Show answerUseMiddleware<T>(), called on IApplicationBuilder.
What is a minimal API?
Show answerAn HTTP endpoint defined directly in Program.cs without a controller class.
What does MapGet do?
Show answerRegisters an HTTP GET endpoint with a delegate that executes when the route is accessed.
What does MapPost do?
Show answerRegisters an HTTP POST endpoint for handling resource creation.
How do you extract a route parameter in a minimal API?
Show answerPass it as a parameter to the delegate with the same name as the route segment.
How do you extract a query parameter in a minimal API?
Show answerPass it as a parameter to the delegate with the same name as the query key.
What is dependency injection?
Show answerA design pattern where objects receive dependencies from external sources rather than creating them.
What are the three service lifetimes in ASP.NET Core DI?
Show answerTransient, Scoped, and Singleton.
When is a transient service created?
Show answerEvery time it is requested.
When is a scoped service created?
Show answerOnce per HTTP request.
When is a singleton service created?
Show answerOnce for the entire application lifetime.
What method registers a transient service?
Show answerAddTransient<IService, Service>()
What method registers a scoped service?
Show answerAddScoped<IService, Service>()

26 more cards in the app

Study this set free