Closed AlmarAubel closed 8 months ago
- Adoption of C# Raw String Literals: Utilizing the new Raw string literal feature introduced in C# 11, I've refactored the queries for improved readability and reduced complexity. This feature allows for multi-line strings without the need for escape characters, making the SQL queries more readable and maintainable.
I like it and I agree - it is more readable and maintainable
- Dynamic Alias Names in SQL Queries: Wherever alias names in SQL queries were hard-coded, I have updated them to dynamically derive from the DTO property names. This ensures better alignment between the database layer and the data transfer objects, enhancing code consistency and reducing the risk of errors during refactoring or property name changes.
Yes, there were places without that and this is important because of reasons you mentioned.
- Partial Refactor of Update Queries: I've rewritten a portion of the update queries to i clarity. The remaining update queries will be addressed in a subsequent PR.
Ok
- I have moved all queries into their own constant strings. This change streamlines the code structure.
Yep, if something can a be constant it should be.
To sum up - everything is ok, thanks for another great change - I am merging :)
Title: Enhancements to Query Management and Consistency in SQL Queries
Hello,
I've made several improvements to the codebase, focusing on enhancing readability and consistency across all SQL queries. Below is a detailed breakdown of the changes:
Adoption of C# Raw String Literals: Utilizing the new Raw string literal feature introduced in C# 11, I've refactored the queries for improved readability and reduced complexity. This feature allows for multi-line strings without the need for escape characters, making the SQL queries more readable and maintainable.
Dynamic Alias Names in SQL Queries: Wherever alias names in SQL queries were hard-coded, I have updated them to dynamically derive from the DTO property names. This ensures better alignment between the database layer and the data transfer objects, enhancing code consistency and reducing the risk of errors during refactoring or property name changes.
Partial Refactor of Update Queries: I've rewritten a portion of the update queries to i clarity. The remaining update queries will be addressed in a subsequent PR.
I have moved all queries into their own constant strings. This change streamlines the code structure.
The primary goal of these changes is to increase the readability and consistency of the SQL queries throughout the entire codebase. This should aid future development and maintenance efforts.
Looking forward to your feedback and suggestions.