Why there is async only support of ExecuteWithContext for Umbraco.Cms.Persistence.EFCore.Scoping.IEfCoreScope<TDbContext> #17947
Closed
PeterKvayt
started this conversation in
Features and ideas
Replies: 1 comment
-
As noted in the PR (#17948) - we're ultimately working towards making everything (at least database-related) async, so adding new sync methods is not something we're looking to do. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have the following interface: IEfCoreScope
It has only async methods:
ExecuteWithContextAsync<T>(Func<TDbContext, Task<T>> method)
andExecuteWithContextAsync<T>(Func<TDbContext, Task> method)
.Why are there no sync overloads for them?
So here is the situation: umbraco right now has a lot of sync interfaces and if I need to implement some custom logic I need to override one of these interfaces. There are cases when I need to use these custom implementations of custom databases. I created ef core db context following this tutorial. And I need to use the sync version of IEfCoreScope methods but it does not have them.
So can we add sync implementation too?
I know that we can wrap (wait) async version, but it is workaround... I do not want it.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions