docs: unify style in C# section#128497
Conversation
|
@geologyrocks : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 4eed1b4: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
Hey @geologyrocks thanks for helping out. That snippet source repo is here: https://github.com/Azure-Samples/azure-sql-binding-func-dotnet-todo/blob/docs-snippets/ToDoModel.cs (If you do create a PR, please LMK and I'll find someone to merge it). |
|
GitHub Copilot has some other feedback on your updates: Thanks for contributing @geologyrocks! I appreciate the intent to unify the casing, and you're right that PascalCase is the correct convention for C# public properties. However, there are a few issues with this PR as-is: Issues found1. Compile error — structured logging syntaxThe logging changes use logger.LogInformation($"Change operation: {ChangeOperation}", change.Operation);This won't compile because
2. Compile error — variable name casing typoThe variable is declared as 3. Java fields should stay camelCaseJava naming conventions use camelCase for fields ( 4. Sample repo needs updating firstThe inline code snippets reference properties from the The ToDoModel.cs currently still uses lowercase ( Suggested path forward
Let me know if you'd like help with the sample repo PR! |
|
#label:"changes-required" |
|
@geologyrocks : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Hi all, my ToDoItem PR is here and I've made the changes suggested by Copilot. Apologies for the bad Java change, I'd naïvely assumed it was the same as C#, but as it's outside my wheelhouse I've reverted it. I decided to keep to the new pattern of passing logging arguments as named properties instead of an interpolated string as it makes it easier to search logs for the named properties instead of interpolated strings. It's also a recommendation in MS docs https://learn.microsoft.com/en-us/dotnet/core/extensions/logging/library-guidance#avoid-string-interpolation-in-logging Does your repo permit squash commits? I was planning to get this PR closed that way. No problem if not, I'll rebase to squash the two commits to give clean git history. |
|
Learn Build status updates of commit e8f36e9: ✅ Validation status: passed
For more details, please refer to the build report. |
|
@ggailey777 Could you review this proposed update to your article and enter Thanks! |
Maintainers, I couldn't find where the ToDoModel.cs was located, but it also needs changing as it uses a mix of PascalCase and lowercase for its Properties; these should all be PascalCase.
:::code language="csharp" source="~/functions-sql-todo-sample/ToDoModel.cs" range="6-16":::