Skip to content

HTTP Methods Overview in Quick Start #67

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

Closed
DaneeTheDeveloper opened this issue Oct 1, 2021 · 11 comments
Closed

HTTP Methods Overview in Quick Start #67

DaneeTheDeveloper opened this issue Oct 1, 2021 · 11 comments
Assignees
Labels
documentation Improvements or additions to documentation Getting Started Docs designed to give developer quick overviews on how to implement specific features

Comments

@DaneeTheDeveloper
Copy link

DaneeTheDeveloper commented Oct 1, 2021

I tried out the following code provided in the doc

app.MapGet("/hello", () => "Hello World!");
app.MapGet("/todos", () => new { TodoItem = "Learn about routing", Complete = false });
app.MapPost("/todos", () => Result.Ok());

And I received the following error message-

(6,29): error CS0103: The name 'Result' does not exist in the current context

Just want to make note of that!

@LadyNaggaga LadyNaggaga self-assigned this Oct 1, 2021
@LadyNaggaga LadyNaggaga added bug Something isn't working documentation Improvements or additions to documentation Getting Started Docs designed to give developer quick overviews on how to implement specific features and removed bug Something isn't working labels Oct 1, 2021
@LadyNaggaga
Copy link
Contributor

Thank you @DaneeTheDeveloper can you please confirm what version of .NET you have installed ?

@DaneeTheDeveloper
Copy link
Author

Screen Shot 2021-10-02 at 10 07 28 AM

Hi @LadyNaggaga

I am currently using .NET 6. I'm going to delete my bin and obj files and do 'dotnet restore' to see if it will continue to happen.

@DaneeTheDeveloper
Copy link
Author

I deleted the files and did 'dotnet restore', ran it again and it failed.
Screen Shot 2021-10-02 at 10 10 54 AM
Screen Shot 2021-10-02 at 10 11 57 AM

@davidfowl
Copy link
Collaborator

What version of .NET 6? Make sure you have the latest preview.

@DaneeTheDeveloper
Copy link
Author

I ran 'dotnet --list-sdks' in the terminal and it returned the following

Screen Shot 2021-10-02 at 10 35 50 AM

@DaneeTheDeveloper
Copy link
Author

The editor I'm using is VS code.

@davidfowl
Copy link
Collaborator

That looks good. What happens if you run dotnet build from the command line? If that works, you might need to update your VS code csharp extension.

@DaneeTheDeveloper
Copy link
Author

I ran dotnet build in the terminal and it returned the following

Screen Shot 2021-10-02 at 10 40 58 AM

@davidfowl
Copy link
Collaborator

Ah, it's Results with an s 😄 Results.Ok

@davidfowl
Copy link
Collaborator

Fixed the doc

@DaneeTheDeveloper
Copy link
Author

Tested 'Results' out on my end and it worked! 😄 Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Getting Started Docs designed to give developer quick overviews on how to implement specific features
Projects
None yet
Development

No branches or pull requests

3 participants