0

I am making an app with Xamarin. I try to use database, recommendation (first and only options when Googling) is to use SQLite.

I created Database class:

public class Database
    {
        private readonly SQLiteAsyncConnection db;

        public Database(string dbPath)
        {
            db = new SQLiteAsyncConnection(dbPath);
            db.CreateTableAsync<Patient>();
        }

        public Task<List<Patient>> ReadPatients()
        {
            return db.Table<Patient>().ToListAsync();
        }

        // returns number of updated records
        public Task <int> UpdatePatient(Patient patient)
        {
            return db.UpdateAsync(patient);
        }
    }

I try to use ReadPatients() but there is no point in that because I havent created any tables, I dont know how to see them and where to find them? How can I create tables, configure fields and foreign keys for them and see their content? I am using Visual Studio 2019.

UPDATE To be clear I would like to see table not in a console, or just to know theoretically that it existcs, but I want to see a list of tables (like in PL SQL developer, PHPMYADMIN) where youcan press on a table, select from it and see nice clear view: enter image description here I am starting to think its not really possible with SQLite? What else could I use then?

4
  • Does this answer your question? Create SQLite Database and table Commented Feb 28, 2023 at 9:15
  • Maybe. As I understand its impossible to see something like a normal table when queried? I added a picture of what I want in my question Commented Feb 28, 2023 at 11:16
  • 1
    There are numerous tools you can use to view and manage SQLite dbs. Google “SQLite manager” Commented Feb 28, 2023 at 11:44
  • Yes, you can try the database tools such as the SQLiteManger, SQLiteStudio and so on. Commented Mar 15, 2023 at 8:22

1 Answer 1

1

Seems like what you want is some database administration software. SQLite is a library for performing operations on an database - it won't provide a visual view of any databases.

You should have a look at something like MSSQL Management Studio MSSQL Studio Documentation if you want a GUI where you can view and manage databases.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.