Created
July 26, 2019 09:23
-
-
Save SametSahin10/0dbd8128fe8991b81ebfe08464ae10f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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