Unit 5: ASP.NET Core MVC, Entity Framework Core and Security - Subjective Questions

CSE253 — .Net Programming • Practice Questions with Detailed Answers

20 questions

1

Define the middleware request pipeline in ASP.NET Core. Explain how an HTTP request and response travel through the pipeline.

2

Explain why the ordering of middleware is important in ASP.NET Core. Illustrate your answer with a typical MVC middleware sequence.

3

Describe any five commonly used built-in middleware components in ASP.NET Core and state the purpose of each.

4

What is custom middleware? Describe how to create, register, and execute custom middleware in ASP.NET Core.

5

Define dependency injection in ASP.NET Core. Explain the roles of the service container, service registration, and constructor injection.

6

Distinguish between Transient, Scoped, and Singleton service lifetimes in ASP.NET Core dependency injection. Give a suitable use case for each.

7

Introduce Entity Framework Core and explain its major advantages and components in a .NET application.

8

Explain the purpose and lifecycle of DbContext and DbSet<TEntity> in Entity Framework Core.

9

Compare data annotations and the Fluent API for entity configuration in Entity Framework Core.

10

Describe the Code First approach in Entity Framework Core. Explain the steps for creating a database from entity classes.

11

Describe the Database First approach in Entity Framework Core. How is an existing database reverse-engineered into a model?

12

Compare the Code First and Database First approaches in Entity Framework Core.

13

What are database migrations in Entity Framework Core? Explain how migrations are created, reviewed, applied, and rolled back.

14

Explain how Create and Read operations are performed using Entity Framework Core in an ASP.NET Core MVC application.

15

Explain how Update and Delete operations are performed using Entity Framework Core. Discuss entity state tracking and concurrency considerations.

16

Explain how LINQ, eager loading, explicit loading, lazy loading, and AsNoTracking() are used when querying data with Entity Framework Core.

17

Distinguish between authentication and authorization in ASP.NET Core web applications.

18

Describe the complete working of cookie-based authentication in an ASP.NET Core MVC application.

19

Explain role-based, claims-based, and policy-based authorization in ASP.NET Core, with suitable examples.

20

Describe how to design a secure ASP.NET Core MVC CRUD application using Entity Framework Core, authentication, and authorization.