Enhance search, Azure SQL support, and refactor WinForms app#28
Merged
Enhance search, Azure SQL support, and refactor WinForms app#28
Conversation
Introduce DatabaseEngineType enum and Azure SQL authentication mode. Add Azure SQL profiler template, template factory, and engine detector service. Update Connection model, repositories, WinForms UI/resources and Sqlite migration to add EngineType and AuthenticationMode columns for existing DBs. Add unit tests for enums, templates, connections and detector.
Bump WinForms app version to 1.2.0-dev.1 and set File/AssemblyVersion to 1.2.0. Register Icons\light-query-profiler.ico in the csproj and copy it to output; load the icon at runtime from the output folder. Map SqlException 4060/40615 to a new localized resource key AzureSqlDatabaseConnectionError for clearer user guidance. Minor VSCode tasks.json formatting fixes
Embed the icon in the assembly and load it in the form's Shown event so the taskbar icon appears correctly on .NET 10. Add Resources.ApplicationIcon and update the csproj to include the ICO as an EmbeddedResource.
Convert NUnit attributes ([TestFixture], [Test], [SetUp], [TestCase]) to xUnit ([Fact], [Theory], [InlineData]) and replace NUnit assertions with xUnit Assert APIs. Update test projects to remove NUnit packages and add xunit.v3/xunit.runner.visualstudio. Replace global using for NUnit with global using Xunit. Use constructors and readonly fields for test setup where appropriate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for Azure SQL Database alongside SQL Server, adds new database engine and authentication mode options, and updates the project configuration to focus on the WinForms application rather than the web app. It also migrates build and test tasks to root-level configuration files and ensures database schema compatibility for existing users.
Support for Azure SQL Database and new engine options:
DatabaseEngineTypeenum to represent SQL Server and Azure SQL Database engine types (src/LightQueryProfiler.Shared/Enums/DatabaseEngineType.cs).AzureSqlProfilerSessionTemplateclass for database-scoped event sessions in Azure SQL Database (src/LightQueryProfiler.Shared/Models/AzureSqlProfilerSessionTemplate.cs).ProfilerSessionTemplateFactoryto select the correct session template based on engine type (src/LightQueryProfiler.Shared/Factories/ProfilerSessionTemplateFactory.cs).Expanded authentication mode support:
AzureSQLDatabaseoption toAuthenticationModeenum and updated its string representation (src/LightQueryProfiler.Shared/Enums/AuthenticationMode.cs,src/LightQueryProfiler.Shared/Extensions/AuthenticationModeExtensions.cs). [1] [2]Connectionmodel to includeEngineTypeandAuthenticationModeproperties (src/LightQueryProfiler.Shared/Models/Connection.cs). [1] [2] [3]Database schema migration:
SqliteContextto addEngineTypeandAuthenticationModecolumns to theConnectionstable if they do not exist, ensuring backward compatibility for existing databases (src/LightQueryProfiler.Shared/Data/SqliteContext.cs).Project configuration and task updates:
.vscode/launch.jsonand.vscode/tasks.jsonto target the WinForms app instead of the web app, and migrated build/test tasks to root-level files; removed obsolete configs fromsrc/.vscode/(.vscode/launch.json,.vscode/tasks.json,src/.vscode/launch.json,src/.vscode/tasks.json,.zed/tasks.json). [1] [2] [3] [4] [5] [6] [7]Dependency updates:
ConnectionRepositoryto use new enums for engine and authentication types (src/LightQueryProfiler.Shared/Repositories/ConnectionRepository.cs).