Skip to content

Conversation

@ShadyNagy
Copy link
Contributor

Add BeginTransaction(IsolationLevel) and BeginTransactionAsync(IsolationLevel) overloads to InMemoryTransactionManager that delegate to existing parameterless methods.

  • Add BeginTransaction(IsolationLevel) method
  • Add BeginTransactionAsync(IsolationLevel, CancellationToken) method
  • Add tests for new overloads

This makes behavior consistent - transactions are already ignored by InMemory provider, so isolation levels should be ignored too instead of throwing.

Ref: dotnet/EntityFramework.Docs#5254 (@roji's comment)

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

Add BeginTransaction(IsolationLevel) and BeginTransactionAsync(IsolationLevel, CancellationToken) that delegate to existing parameterless methods, ignoring the isolation level parameter.

This makes InMemory provider behavior consistent - transactions are already ignored, so isolation levels should be ignored too instead of throwing.
Add tests for BeginTransaction(IsolationLevel) and BeginTransactionAsync(IsolationLevel).
Merge tests into main feature branch
@ShadyNagy ShadyNagy requested a review from a team as a code owner January 28, 2026 22:08
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this really looks to me like it was just an oversight in the original implementation.

@roji roji enabled auto-merge (squash) January 29, 2026 08:49
@ShadyNagy
Copy link
Contributor Author

ShadyNagy commented Jan 29, 2026

@roji
The SQLite.FunctionalTests failure appears to be a flaky test - it passed in the previous run without any code changes on my part.
Let me know if you need me to do anything.

@roji roji disabled auto-merge January 29, 2026 13:31
@roji roji merged commit 11643fb into dotnet:main Jan 29, 2026
8 of 10 checks passed
@ShadyNagy ShadyNagy deleted the patch-1 branch January 29, 2026 13:52
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.

2 participants