Skip to content

Create Table

jgiacomini edited this page Oct 1, 2017 · 11 revisions

Create Table

Create Table is easy in TinySQLite

The first thing you have to do is to create a POCO class which represent your table :

public class MyTable
{
    public string MyColumn1 { get; set; }
    public string MyColumn2 { get; set; }
}

You have just to call CreateTableAsync method.

var context = new DbContext(_pathOfDb);
var table = context.Table<MyTable>();
await table.CreateTableAsync();
Clone this wiki locally