Fix compiler and update Odata sample#1127
Conversation
commonsensesoftware
left a comment
There was a problem hiding this comment.
Most of this looks fine with a couple of minor housekeeping changes and then it can be merged.
examples/AspNetCore/OData/ODataBasicExample/Controllers/PeopleController.cs
Show resolved
Hide resolved
| @@ -0,0 +1,22 @@ | |||
| @HostAddress = https://localhost:5001 | |||
There was a problem hiding this comment.
I don't see how this file is necessary at all. The OpenAPI example supplants the need for it. While I'm not completely opposed to the idea, this file just feels one-off and out of sync with the other examples. I'm not convinced this is worth keeping - yet.
There was a problem hiding this comment.
Using .http file is the easiest way to make API calls and view the results.
There was a problem hiding this comment.
I disagree. Running the OpenAPI examples are. This is highly inconsistent. Why just this one? Are you going to go add these for all example projects?
|
|
||
| builder.Services.AddControllers().AddOData(); | ||
| builder.Services | ||
| .AddControllers() |
There was a problem hiding this comment.
😆 You partially fixed the alignment. Now, .AddControllers and .AddOData should align to .AddServices
|
This was a partially completed thought, but not a bad idea. Closing this out as it is superseded by #1163. |
Fix compiler errors and update Odata sample
Summary of the changes (Less than 80 chars)
Description
Updated the OData sample and fixed the compiler error