The following methods don't have synchronous equivalents:
Since EF Core provides both synchronous and asynchronous APIs, in the EF Core provider implementation we need to choose between throwing NotSupportedException and applying workarounds that can cause threads to block and deadlocks.
This issue existed in previous versions of the SDK, and still applies to Cosmos SDK version 3.0.0.1-preview.
cc @AndriySvyryd @ajcvickers @kirillg
Can you please more on how only async blocks/dead-locks but sync works?
@kirankulkarni747 Calling an async method from a sync method requires some kind of blocking (like Task.Wait()) this goes against best practices as it can cause deadlocks. Using ConfigureAwait(false) to avoid deadlocks is brittle and can't be relied on.
I think a better solution would be...
"Remove synchronous methods from EF Core"
@jackbond For local databases and scenarios without strict memory constraints synchronous methods are usually more performant.
@AndriySvyryd Dear Cosmos team, please supply an implementation of this SDK in machine language. Machine language is "usually more performant".
It's 2019, I'm dumbfounded that this is even a consideration.