Skip to content

Instantly share code, notes, and snippets.

@SametSahin10
Created July 26, 2019 09:23
Show Gist options
  • Save SametSahin10/0dbd8128fe8991b81ebfe08464ae10f7 to your computer and use it in GitHub Desktop.
Save SametSahin10/0dbd8128fe8991b81ebfe08464ae10f7 to your computer and use it in GitHub Desktop.
private readonly static string DBNAME = "Bonarego.db";
public DataBase()
{
CreateDataBase();
}
public static string documentsFolder()
{
string path;
path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
Directory.CreateDirectory(path);
return path;
}
public static void CreateDataBase()
{
var conn = new SQLiteConnection(System.IO.Path.Combine(documentsFolder(), DBNAME), false);
conn.CreateTable<KULLANICI_BILGILERI>();
conn.CreateTable<Languages>();
conn.CreateTable<COUNTRY>();
conn.CreateTable<CITY>();
conn.CreateTable<MY_TRIP>();
conn.CreateTable<Fee_Root>();
conn.CreateTable<Mekanlar_Location>();
conn.CreateTable<PARENT_CATEGORYS>();
conn.CreateTable<SALESS>();
conn.CreateTable<ShowPopup>();
conn.Close();
if (File.Exists(System.IO.Path.Combine(documentsFolder(), DBNAME)))
{
Log.Debug("warn","File exist!");
}
else
{
Log.Debug("warn","File not exist!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment