Skip to content

Conversation

@deepchoudhery
Copy link
Member

Program.cs or similar classes with top level statements could not be used as an endpoints class for minimal api endpoints scenario.

  • Program.cs or other (only 1 allowed currently but scaffolding does not care) can be used an endpoints class.
  • Add a new static class at the end of Program.cs instead of creating a new file for the class.
  • Add necessary usings and IEndpointRouteBuilder extension calls.

@deepchoudhery deepchoudhery self-assigned this Feb 27, 2023
@deepchoudhery deepchoudhery merged commit d24b4f2 into main Feb 27, 2023
@deepchoudhery deepchoudhery deleted the dev/decho/fix-minimal-endpoints-in-minimal-classes branch February 27, 2023 19:39
deepchoudhery added a commit that referenced this pull request Feb 27, 2023
…2292)

* init

* file with top level statements can be used for endpoints now!

* minor fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants