Download sqllite db from MAUI Blazor App

Anonymous
2023-11-18T17:09:33.68+00:00

Here is a MAUI App that uses SQLLite ,

https://github.com/KalyanAllam/SQLiteDemoWithBlazorApp/

 private async void SetUpDb()
        {
            if (_dbConnection == null)
            {
                string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Student.db3");
                _dbConnection = new SQLiteAsyncConnection(dbPath);
                await _dbConnection.CreateTableAsync<StudentModel>();
            }
        }

I want to download the database where could I find it?,also how do I view sqllite databases, like some sqlserver

Student.db3

 
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,160 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 48,481 Reputation points
    2023-11-18T19:09:44.42+00:00

    SQLLite is an in-memory database with a backing store file. You just add the library (nuget package) to your app.

    https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/?tabs=netcore-cli

    the sample code create the database file the first time it’s run. The name and path will be in the connection string. The default folder will be the bin folder.

    once you have a database file, you can pick any 3rd party tool to open it (only one app can access at a time). Google for several options.

    Vscode extension

    https://marketplace.visualstudio.com/items?itemName=alexcvzz.vscode-sqlite

    0 comments No comments

0 additional answers

Sort by: Most helpful