This example is part of a recipe from the book published by Packt:
In the book, this recipe covers:
- The basics of connecting to a Web API service from a .NET MAUI app.
- Modifying the existing repository to interact with a Web API service.
Note: This example may not include all the points mentioned above. For complete details, please refer to the corresponding recipe in the book.
- Run the c4-WebApiServer project without debugging.
- Select c4-WebApiMauiClient as startup project.
- Select the debugging device.
- Start debugging the c4-WebApiMauiClient project.
- Open the folder with the solution (File | Open Folder) and in in the Terminal window, run the following command to navigate to the server folder:
cd c4-WebApiServer
- Start the server using the
https
profile defined in Properties | launchSettings.json by running:The server should start on portdotnet run --launch-profile https
7197
, as specified in the launchSettings.json file. - Open this URL in your browser to view Swagger:
https://localhost:7197/swagger
- To run the client .NET MAUI project, use either the .NET Meteor or .NET MAUI VS Code extensions. Follow the setup steps in each extension's documentation to get started.