[ApiController]
[Route("api/[controller]")]
public class RentalController : ControllerBase
{
...
[HttpGet("inquiries")]
public async Task<ActionResult<List<WebInquiry>>> Inquiries()
{
Since you are using [HttpGet("inquiries")]
, the request URL should be https://localhost:7260/api/Rental/inquiries
.
More detail information, see Route templates.
If the above request URL still not working, can you share the program.cs file content?
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion