public class Client { public int ID; public string Name; } public class Invoice { public int ID; public Client MyClient; }
CREATE TABLE `Clients` ( `ID` integer NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` varchar ); CREATE TABLE `Invoices` ( `ID` integer NOT NULL PRIMARY KEY AUTOINCREMENT, `Client_ID` integer );
Quote:I would recommend you install the SQLite-net package from NuGet in addition to the SQLite dll. This may make your life simpler. I know it makes it easier for me. This way, you just create your tables based on your Models (or ViewModels) by calling dbConnection.CreateTable<{classname}>() .
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)