Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To run the project, publish the RestaurantReviewsDatabase project to an instance of SQL Server. Update the RestaurantReviewsDatabase connection strings in the appsettings.json and appsettings.Development.json files in the RestaurantReviews.Web project with the server and database name. Then start the RestaurantReviews.Web project in Debug from Visual Studio.
There is a Swagger UI at the root of the web to interact with the API methods.
The Restaurants GET method returns a list of all restaurants in the database for the specified city. Values for the city parameter that will return data are "Pittsburgh" and "Bridgeville". If the city parameter isn't provided, all restaurants are returned.
The Restaurants POST method creates a new restaurant. The restaurant name, address, city, state, and zip code are required.
The Reviews POST method creates a new restaurant review. The restaurantId, userId, and the content of the review are required. Possible values for restaurantId are 1, 2, 3, and 4. Possible values for userId are 1 and 2.
The Reviews DELETE method marks the restaurant review specified by parameter reviewId as deleted.
The UserReviews GET methods returns all active restaurant reviews for the user specified by the userId parameter or the username parameter. Values for the userId parameter that will return data are 1 and 2. Values for the username parameter that will return data are "testuser1" and "testuser2".