Localdb Blazor Wasm

Faheem Husain Rizvi 6 Reputation points

Integrate sqlite database in .net 6 blazor wasm app at client side

A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,202 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,578 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,445 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 48,481 Reputation points

    Blazor WASM is working on supporting the calling of other WASM libraries.


    SqlLite has been converted to WASM with some limitations. As WASM application have no file access, it is a memory only database. The SqlLite WASM comes with some javascript to copy the in memory database to local storage.

    here is a video of Blazor WASM calling SqlLite


    note: there were some issues with the .net 6 release, don't know if they were fixed.

    while this is great technology example, I'm not use I'd use such a heavy approach. As its only an in-memory database, it seems Linq to objects would work just as well and a much simpler and more stable solution. As with the SqlLite, you cache the objects to local storage.

    0 comments No comments