public static int GetId (SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLast () == null) { return 0; } string k = dtb.GetLast ().Id; return int.Parse (k); }