company is launching a room service for managing rooms. The service should be a web API layer using .NET Core 3.0. You already have a prepared infrastructure and need to implement the Web API Controller RoomsController. Use the Middleware mechanism from .Net Core to protect the API service from the third-party requests.
The following API calls are implemented:
Creating rooms: a POST request to the endpoint api/rooms adds the room to the database. The HTTP response code is 200.
Getting all rooms: a GET request to the endpoint api/rooms returns the entire list of rooms. The HTTP response code is 200.
Getting room by id: a GET request to the endpoint api/rooms/{id} returns the details of the room for (id). If there is no room with fid), status code 404 is returned. On success, status code 200 is returned.
Getting all rooms filtered by the Floor property: a GET request to the endpoint api/rooms?Floors= (floor1)&Floors-(floor2) returns the entire list of rooms for floor1 and floor2. The HTTP response code is 200.