-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Use scaffolder to generate Web API code #10274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@danroth27 please review. This is marked P2 because it's automaticly done as part of the 3.0 doc updates. cc @tdykstra @scottaddie |
What would the scaffolding method and is there documentation regarding scaffolding methodology? |
@glennc are you in favor of updating the basic Web API tutorials to use scaffolding? |
Would you leave both options or switch it over to only show scaffolding? I don't have an objection to showing them scaffolding, especially if what we are showing them to write is no different to what you'd get from the scaffolder. |
Currently we have
That would be changed to
I could add a note saying you don't need to run the scaffolder, just copy/paste the methods you're interested in. The code we're using now is the same as the scaffolder generates. |
While running through the tutorial using VS 2019, .Net Core 2.2, and generating the code with API Controller with actions, using Entity Framework, I noticed the generated code does not match the code in the tutorial. Specifically, Post Method Delete Method Put Method try Tutorial code: await _context.SaveChangesAsync(); Generated code has the TodoItemExists method, but the tutorial does not. private bool TodoItemExists(long id) |
To do: Delete Method Verify with the scaffolding folks. |
|
and services.AddControllers(); for new version |
This was complete last version. |
Uh oh!
There was an error while loading. Please reload this page.
Use scaffolder to generate Web API code.
Currently we use a cook book approach and have them copy/paste each method. It might be better to use the scaffold to generate the code, then have a discussion of each generated method. That's what we do in the RP and intro to MVC series.
I propose for the 3.0 version we use the scaffolder. The 2.2 version will keep the copy/paste approach. We can compare CSAT between the two versions.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: