Skip to content

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

Closed
@1618employment

Description

@1618employment

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssembly

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions