Unit 6: Asp.Net With Web API - Subjective Questions

INT402 — Modern Web Programming Tools And Techniques • Practice Questions with Detailed Answers

20 questions

1

Define REST. Explain the concepts of resources, representations, and resource URIs in RESTful services.

2

Explain the major architectural constraints of REST and discuss how they improve a web service.

3

Describe the roles of the HTTP methods GET, POST, PUT, PATCH, and DELETE in a RESTful Web API. Mention suitable HTTP status codes.

4

Distinguish between REST and SOAP web services.

5

What is ASP.NET Web API? Explain its important features and request-processing components.

6

Compare an ASP.NET MVC controller with an ASP.NET Web API controller.

7

Describe the steps required to create and run the first ASP.NET Web API project.

8

Explain the purpose of models, controllers, model binding, and media-type formatters in ASP.NET Web API.

9

Describe how to create and configure a database for an ASP.NET Web API using Entity Framework.

10

Explain the relationship among an entity class, DbContext, DbSet, and a database connection string.

11

Explain how GET operations are implemented for retrieving all records and a single record in ASP.NET Web API.

12

Describe how a POST operation creates a new database record in ASP.NET Web API.

13

Compare PUT and PATCH, and explain how an update operation should handle validation, missing resources, and database persistence.

14

Explain the implementation and expected responses of a DELETE operation in ASP.NET Web API.

15

Describe the complete request-response flow for CRUD operations in a database-backed ASP.NET Web API.

16

Explain how Postman can be used to test all CRUD operations of an ASP.NET Web API.

17

What is convention-based routing in ASP.NET Web API? Explain the structure and working of a default route.

18

Explain attribute routing in ASP.NET Web API with suitable route-prefix, parameter, and constraint examples.

19

Compare convention-based routing and attribute routing. How are ambiguous routes and route conflicts prevented?

20

Discuss good practices for validation, error handling, status codes, and security while building and testing an ASP.NET Web API.