Skip to content

Conversation

@habbs19
Copy link
Owner

@habbs19 habbs19 commented Jan 12, 2026

Motivation

  • Remove direct provider enum dependencies from consumer code by introducing a single, provider-agnostic parameter type enum.
  • Provide a consistent parameter direction enum so callers do not need to reference provider-specific ParameterDirection types.
  • Allow AddParameter helpers to accept core enums and map them to provider-specific types internally to reduce cross-project references.
  • Keep existing provider behavior by mapping core enums to each provider's native types.

Description

  • Add DataAccessDbType and DataAccessParameterDirection enums in DataAccessProvider.Core/Types to represent parameter type and direction respectively.
  • Update AddParameter extension methods for MSSQL, MySQL, Postgres, Oracle and Snowflake to accept DataAccessDbType and DataAccessParameterDirection and map them to provider-specific types via MapDbType/MapDirection helpers.
  • Update demo code, README examples and unit test sources to use DataAccessDbType in parameter calls (e.g., AddParameter(..., DataAccessDbType.String, ...)).
  • Preserve previous overloads' behavior by translating to the same provider types internally, and throw ArgumentOutOfRangeException for unsupported mappings.

Testing

  • No automated tests were executed as part of this change.
  • Unit test source files were updated to reference DataAccessDbType, but test runs were not performed here.
  • No CI or build verification was performed by this patch.
  • Consumers should run dotnet build and dotnet test in their environment to validate compilation and behavior.

Codex Task

@habbs19 habbs19 merged commit e5a72b8 into main Jan 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants