You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit modernizes and refactors various parts of the codebase to improve readability, maintainability, and performance. It includes updates to dependencies, code style improvements, and the use of modern C# features.
- Updated `husky` tool version in `dotnet-tools.json` from `0.7.1` to `0.7.2`.
- Added `using System.Diagnostics.CodeAnalysis;` to multiple files.
- Renamed `BadDbTypes` to `_BadDbTypes` in `DbCommandExtensions.cs` and updated its initialization syntax.
- Replaced manual null checks with `ArgumentNullException.ThrowIfNull` and `ArgumentNullException.ThrowIfNullOrEmpty`.
- Changed variable declarations to use explicit types (`DbParameter`).
- Added `[return: NotNullIfNotNull(nameof(defaultValue))]` attribute to methods in `DbCommandExtensions.cs` and `IDataRecordExtensions.cs`.
- Improved variable naming consistency in `DbCommandExtensions.cs`.
- Simplified null checks using `is not null`.
- Removed `GlobalSuppressions.cs` file.
- Refactored `ParameterBase<TDataType>` class to use a primary constructor and set default values directly in property initializers.
- Simplified `!=` operator and updated `Equals` and `GetHashCode` methods in `ParameterBase<TDataType>` class.
- Modernized `Batch` class with a primary constructor, inline property initializers, and `[GeneratedRegex]` attribute.
- Updated various methods in `Batch` class to use modern C# features and more descriptive variable names.
- Made `Command` and `Connection` classes partial.
- Updated `Parameters` property initialization in `Command` class.
- Renamed private fields to follow a consistent naming convention.
- Replaced regex fields with methods marked with `[GeneratedRegex]` attribute.
- Updated `Equals` method to use pattern matching.
- Improved null checks and variable naming in `Command` class.
- Refactored `StringParameter` class to use a primary constructor.
- Updated `Microsoft.Data.SqlClient` package version from `5.2.2` to `6.0.0`.
- Made several improvements to `SQLHelper.cs` including using discards, expression-bodied members, and modern C# features.
0 commit comments