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

NET5 - Does Blazor + WASM + Client-Side-Only (No Server) support EF + Sqlite + InMemory? #34141

Closed
1618employment opened this issue Jul 6, 2021 · 4 comments
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly
Milestone

Comments

@1618employment
Copy link

I've search all over the internet, but my search has been complicated by the "language" used to describe this paradigm or "hosting model".

When attempting to use [ EFCore + Sqlite + InMemory ] in a Blazor + WASM + Client-Side-Only App...

optionsBuilder.UseSqlite($"Data Source=:memory:;");

I get...

System.DllNotFoundException: e_sqlite3
at SQLitePCL.Batteries_V2.MyGetFunctionPointer..ctor(IntPtr dll)
at SQLitePCL.Batteries_V2.MakeDynamic(String name, Int32 flags)
at SQLitePCL.Batteries_V2.DoDynamic_cdecl(String name, Int32 flags)
at SQLitePCL.Batteries_V2.Init()

#1 - In NET5, does Blazor + WASM + Client-Side-Only (No Server) support EF + Sqlite + InMemory?

#2 - If not, what is the officially supported solution for Entity Framework to browser storage (IndexedDB)?

#3 - Is Cosmos DB the only NoSql provider for Entity Framework? Is there a local equivalent?

I have a Windows desktop app that I would like to make "cross-platform" by porting it to Blazor + WASM + Client-Side-Only = NO SERVER, NO API.

I've been able to port everything EXCEPT local data storage. The desktop app uses EFCore + SQLITE works awesome!

Before anyone talks about sandboxes or other considerations etc...trust me, I am aware of the limitation of browser local storage, I can use JS interop to CRUD browser local storage and IndexedDB...not the issue or that even browser storage is ephemeral, got it! I want to store data collected from the network for as long as possible without re-fetching and re-constructing it.

My issue is bridging the gap between my existing EFCore code base and browser local storage?

I'm also familiar with and have tried the Uno Platform, but have chosen not to go that route at this time.

Thank You!

@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Jul 6, 2021
@1618employment
Copy link
Author

"Standalone" Blazor WASM I guess is the correct verbiage!

Removing sqlite from the equation and just using "Microsoft.EntityFrameworkCore.InMemory" partially resolved my issue for each session, but I'm still looking for an "official" solution to save/load EF to browser storage (IndexedDB) between sessions? Roll my own? Update IndexedDB from the network and then load that into InMemory EF? Write back to IndexedDB when my InMemory EF changes? I need something more than querying by just a key.

@mkArtakMSFT
Copy link
Member

Thanks for contacting us.
This is not supported at the moment.

@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Jul 8, 2021
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone Jul 8, 2021
@ghost
Copy link

ghost commented Jul 8, 2021

Thanks for contacting us.

We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@ghost
Copy link

ghost commented Jul 20, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly
Projects
None yet
Development

No branches or pull requests

2 participants