Skip to content

checking if endpoints class is static, if not, creating one.#2002

Merged
deepchoudhery merged 1 commit into
mainfrom
dev/decho/static-class-endpoints-fix
Sep 1, 2022
Merged

checking if endpoints class is static, if not, creating one.#2002
deepchoudhery merged 1 commit into
mainfrom
dev/decho/static-class-endpoints-fix

Conversation

@deepchoudhery

@deepchoudhery deepchoudhery commented Sep 1, 2022

Copy link
Copy Markdown
Member

Check if endpoints class is static,

  • if it IS, continue as usual, create endpoints method in that class.

  • if it IS NOT, create a new static class in the same file (at the end of the file) and add the scaffolded endpoints method to the newly created class.

  • additional fix where Microsoft.EntityFrameworkCore namespace is added if a DbContext is being used, not just when a DbContext namespace is present (in the endpoints class).

@deepchoudhery deepchoudhery self-assigned this Sep 1, 2022

@zahalzel zahalzel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one question on string equality, otherwise looks good

Comment thread src/Scaffolding/VS.Web.CG.Mvc/Minimal Api/MinimalApiGenerator.cs
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.

2 participants