Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linq2db queries should only use transactions for write queries (OSOE-343) #81

Open
Piedone opened this issue Sep 8, 2021 · 2 comments

Comments

@Piedone
Copy link
Member

Piedone commented Sep 8, 2021

As discussed at the Orchard meeting of 07.09.2021, for performance reasons linq2db queries shouldn't always open a transaction since for reads this is not necessary. Ideally, we'd have something like ITransactionManager.GetOrCreate() in Orchard or YesSql since YesSql opens transactions only the first time a write query happens, lazily.

See this discussion on what can be used from the linq2db API.

Jira issue

@hishamco
Copy link
Contributor

linq2db never opens transaction without explicit request and we don't have any intentions to provide such opionated functionality.

While there's no plan in Linq2db, what's your suggestion here

@Piedone
Copy link
Member Author

Piedone commented Feb 24, 2022

I don't have any specific suggestion; the implementation details are up to be figured out.

@sarahelsaig sarahelsaig changed the title Linq2db should queries should only use transactions for write queries Linq2db queries should only use transactions for write queries Feb 24, 2022
@github-actions github-actions bot changed the title Linq2db queries should only use transactions for write queries Linq2db queries should only use transactions for write queries (OSOE-343) Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants