Skip to content

Update StrEnum to v2.1.0. Add integration tests for string enums in composite primary keys. - #9

Merged
dmytro-khmara merged 1 commit into
masterfrom
composite-primary-key-support
Aug 13, 2026
Merged

Update StrEnum to v2.1.0. Add integration tests for string enums in composite primary keys.#9
dmytro-khmara merged 1 commit into
masterfrom
composite-primary-key-support

Conversation

@dmytro-khmara

@dmytro-khmara dmytro-khmara commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Updates StrEnum to v2.1.0, which adds IComparable<TEnum>, IComparable, and IEquatable<TEnum> to StringEnum<TEnum>, letting a string enum be used as an EF Core key or as part of a composite key.
  • Adds a StrEnum.EntityFrameworkCore.IntegrationTests project, following the *.IntegrationTests convention already used across the ecosystem. It runs against SQLite in memory, so it needs no Docker and runs as part of the existing Docker test target.
  • Adds CompositePrimaryKeyTests, covering a string enum as part of a composite primary key: the model shape, a full round-trip through insert, FindAsync on the composite key, update and query, and a raw-SQL check that the key column holds the member's value.

Test plan

  • dotnet test — 11 unit and 3 integration tests pass
  • docker build --target test . — the CI path passes with the new project wired into the solution and the Dockerfile restore layer

@dmytro-khmara
dmytro-khmara merged commit 63ffeba into master Aug 13, 2026
1 check passed
@dmytro-khmara
dmytro-khmara deleted the composite-primary-key-support branch August 13, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant