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

C# modernization/cleanup in database model factories #29622

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

roji
Copy link
Member

@roji roji commented Nov 19, 2022

No description provided.

@roji roji requested a review from bricelam November 19, 2022 15:45
return command.ExecuteScalar() is string collation
? collation
: null;
command.CommandText = "SELECT SERVERPROPERTY('Collation');";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove the line break?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a reason to have it? This is a self-contained command with a single SELECT, is there a reason to have a leading line break?

Copy link
Contributor

Choose a reason for hiding this comment

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

Readability like all other statements in the class?

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you saying you think a leading newline improves readability in all SQL statements, or is there something special here? Because we certainly don't do it for queries, updates or anything else...

Copy link
Contributor

Choose a reason for hiding this comment

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

I rest my case

@roji
Copy link
Member Author

roji commented Nov 20, 2022

@ErikEJ rebased this and added some cleanup. Can you please give this a quick review to make sure it preserves your views changes?

@ErikEJ
Copy link
Contributor

ErikEJ commented Nov 20, 2022

LGTM - I will give it a spin against my CRM instance when it is in the daily build.

@roji roji merged commit 8fe90b0 into dotnet:main Nov 21, 2022
@roji roji deleted the ScaffoldingCleanup branch November 21, 2022 07:55
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