Skip to content
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

Update project templates use primary constructors and collection expressions #59712

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

Varorbc
Copy link
Contributor

@Varorbc Varorbc commented Jan 4, 2025

update project templates use primary constructors

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Fixes #52893

Sorry, something went wrong.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 4, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 4, 2025
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 11, 2025
@Varorbc
Copy link
Contributor Author

Varorbc commented Jan 25, 2025

@danroth27 ping

@danmoseley
Copy link
Member

@Varorbc apologies for delay.
@captainsafia I believe you own area-mvc which includes most templates? could you have a look?

Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution!

It looks great overall! The move to primary constructors here has revealed places where we were initializing but not using ILoggers. I think it might be worthwhile to continue to inject ILogger's into the classes via the primary constructor but add code to use them in the class so that the functionality is properly demonstrated.

@Varorbc
Copy link
Contributor Author

Varorbc commented Feb 12, 2025

@captainsafia ping

@guardrex
Copy link
Contributor

@captainsafia ... I think we'll have two documentation example changes to mirror these updates. I'll take care of opening and working the doc issue.

@captainsafia
Copy link
Member

/azp run

@captainsafia captainsafia changed the title update project templates use primary constructors Update project templates use primary constructors and collection expressions Mar 10, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@dotnet-policy-service dotnet-policy-service bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Mar 10, 2025
Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

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

LGTM!

Our existing template tests give us good coverage here and we'll be able to do some manual validation on this change once it flows through to main.

@captainsafia captainsafia merged commit e6eb151 into dotnet:main Mar 11, 2025
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview3 milestone Mar 11, 2025
@Varorbc Varorbc deleted the templates branch March 11, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update project templates use primary constructors
4 participants