This file helps coding agents become productive quickly in this repository.
- Repository: SQLHelper
- Main solution: SQLHelper.sln
- Primary package project: src/SQLHelper.DB/SQLHelper.DB.csproj
Run from repository root.
- Restore:
dotnet restore SQLHelper.sln - Build (Debug):
dotnet build SQLHelper.sln --no-restore --configuration Debug - Build (Release):
dotnet build SQLHelper.sln --no-restore --configuration Release - Test:
dotnet test SQLHelper.sln --no-build --verbosity normal - Update dependencies task (VS Code task):
.Net: Update Dependencies
Reference CI command flow in:
Tests require SQL Server access.
- Default local connection is localhost with integrated security.
- Optional env vars used by tests and CI:
SQLHELPER_SQL_PASSWORDSQLHELPER_SQL_SERVER(defaults to127.0.0.1,1433when password is provided)
- Test databases expected by CI/local integration scenarios:
TestDatabaseTestDatabase2MockDatabaseMockDatabaseForMockMapping
References:
- test/SQLHelper.Tests/Utils/TestConnectionStrings.cs
- test/SQLHelper.Tests/appsettings.json
- .github/workflows/dotnet-test.yml
src/SQLHelper.DB/: core library.SQLHelper.cs: main entry point.HelperClasses/: batch, command, connection, parameters.ExtensionMethods/: DB command/data record helpers.CanisterModules/andRegistration/: DI registration.
test/SQLHelper.Tests/: xUnit test suite for library behavior.SQLHelper.SpeedTests/: BenchmarkDotNet performance tests.SQLHelper.Example/andTestApp/: usage/demo apps.docfx_project/: docs generation project.
- Follow project style from .editorconfig (4 spaces, CRLF, C# style settings).
- Keep public API documentation current (package project enables XML docs generation).
- Prefer async APIs for I/O paths and keep
Asyncsuffixes where applicable. - Respect nullable annotations and avoid introducing new warnings.
References:
- Prefer minimal, targeted changes; avoid broad refactors unless requested.
- Do not commit generated
bin/orobj/artifacts. - For behavior changes, update or add tests in test/SQLHelper.Tests.
- For performance-sensitive changes, validate in SQLHelper.SpeedTests.
If local tools are missing, see setup.bat for baseline setup used by this repo.